From 0f4c13fc4346a7904963ee02b4ec2b3bad03d653 Mon Sep 17 00:00:00 2001 From: ajasibley <125228925+ajasibley@users.noreply.github.com> Date: Thu, 25 May 2023 01:19:57 -0700 Subject: [PATCH] Updated justfile, added script to set shell path, and fixed Cargo.toml version issue. --- Cargo.toml | 2 +- justfile | 3 +++ scripts/update_source.sh | 17 +++++++++++++++++ shell.nix | 1 - 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 scripts/update_source.sh diff --git a/Cargo.toml b/Cargo.toml index 5ad443271..4bc7a83e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nexus" version = "0.0.0" -edition = "2033" +edition = "2021" [dependencies] c2pa = "0.21.0" diff --git a/justfile b/justfile index ed2b6090b..26d292139 100644 --- a/justfile +++ b/justfile @@ -4,18 +4,21 @@ scripts_dir := "scripts" install-rust: @if ! command -v rustc &> /dev/null; then \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh; \ + . {{scripts_dir}}/update_path.sh; \ fi # Check if wasm32-unknown-unknown target is installed, if not install it install-wasm-target: @if ! rustup target list --installed | grep -q "wasm32-unknown-unknown"; then \ rustup target add wasm32-unknown-unknown; \ + . {{scripts_dir}}/update_path.sh; \ fi # Check if OpenSSL 1.1 is installed install-openssl: @if ! (command -v openssl &> /dev/null && openssl version | grep -q "OpenSSL 1.1"); then \ . {{scripts_dir}}/install_openssl.sh; \ + . {{scripts_dir}}/update_path.sh; \ fi # Check if cosmo is installed, if not install it diff --git a/scripts/update_source.sh b/scripts/update_source.sh new file mode 100644 index 000000000..0c4c8c11a --- /dev/null +++ b/scripts/update_source.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Detect the current shell +current_shell=$(basename "$SHELL") + +# Run the appropriate command based on the detected shell +case $current_shell in + bash)" + source ~/.bashrc || source ~/.bash_profile + ;; + zsh) + source ~/.zshrc + ;; + *) + exit 1 + ;; +esac diff --git a/shell.nix b/shell.nix index d58464979..9ad28b354 100644 --- a/shell.nix +++ b/shell.nix @@ -6,7 +6,6 @@ pkgs.mkShell { cargo tree poetry - openssl_1_1 vespa-cli ]; shellHook = ''