diff --git a/justfile b/justfile index e4af25599..78bed21d1 100644 --- a/justfile +++ b/justfile @@ -6,37 +6,31 @@ install-nix: # Check if Rust is installed, if not install it install-rust: - @if ! command -v rustup &> /dev/null; then \ + @if ! command -v rustc &> /dev/null; then \ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh; \ - . {{scripts_dir}}/update_path.sh; \ + . {{scripts_dir}}/update_source.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; \ + . {{scripts_dir}}/update_source.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; \ + . {{scripts_dir}}/update_source.sh; \ fi # Check if cosmo is installed, if not install it install-cosmo: @if ! command -v cosmo &> /dev/null; then \ bash -c "$(curl -fsSL https://cosmonic.sh/install.sh)"; \ - current_shell=$$(basename "$$SHELL"); \ - if [ "$$current_shell" == "bash" ]; then \ - echo "export PATH=\"/Users/nexus/.cosmo/bin:\$$${PATH}\"" >> "${HOME}/.bashrc" && source "${HOME}/.bashrc"; \ - elif [ "$$current_shell" == "zsh" ]; then \ - echo "export PATH=\"/Users/nexus/.cosmo/bin:\$$${PATH}\"" >> "${HOME}/.zshrc" && source "${HOME}/.zshrc"; \ - else \ - echo "Unsupported shell: $$current_shell"; \ - fi; \ - fi; \ + . {{scripts_dir}}/update_path.sh; \ + . {{scripts_dir}}/update_source.sh; \ + fi all: install-nix install-rust install-wasm-target install-openssl install-cosmo