Fixed env error
This commit is contained in:
parent
3d6d096ab8
commit
5f727081bc
1 changed files with 26 additions and 14 deletions
40
shell.nix
40
shell.nix
|
@ -15,6 +15,12 @@ pkgs.mkShell {
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check if wasm32-unknown-unknown target is installed, if not install it
|
||||||
|
if ! rustup target list --installed | grep -q "wasm32-unknown-unknown"; then
|
||||||
|
rustup target add wasm32-unknown-unknown
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check if OpenSSL 1.1 is installed
|
# Check if OpenSSL 1.1 is installed
|
||||||
if ! (command -v openssl &> /dev/null && openssl version | grep -q "OpenSSL 1.1"); then
|
if ! (command -v openssl &> /dev/null && openssl version | grep -q "OpenSSL 1.1"); then
|
||||||
|
|
||||||
|
@ -67,13 +73,19 @@ pkgs.mkShell {
|
||||||
bash -c "$(curl -fsSL https://cosmonic.sh/install.sh)"
|
bash -c "$(curl -fsSL https://cosmonic.sh/install.sh)"
|
||||||
|
|
||||||
# Get the current shell name
|
# Get the current shell name
|
||||||
current_shell="$(basename "$SHELL")"
|
current_shell="$(basename ${builtins.getEnv "SHELL"})"
|
||||||
|
|
||||||
# Update the corresponding configuration file based on the current shell
|
# Update the corresponding configuration file based on the current shell
|
||||||
if [[ "$current_shell" == "bash" ]]; then
|
if [[ "$current_shell" == "bash" ]]; then
|
||||||
echo "export PATH=\"/Users/test/.cosmo/bin:\${PATH}\"" >> "${HOME}/.bashrc" && source "${HOME}/.bashrc"
|
cat >> "${builtins.getEnv "HOME"}/.bashrc" <<EOF
|
||||||
|
export PATH="/Users/test/.cosmo/bin:\${builtins.getEnv "PATH"}"
|
||||||
|
EOF
|
||||||
|
source "${builtins.getEnv "HOME"}/.bashrc"
|
||||||
elif [[ "$current_shell" == "zsh" ]]; then
|
elif [[ "$current_shell" == "zsh" ]]; then
|
||||||
echo "export PATH=\"/Users/test/.cosmo/bin:\${PATH}\"" >> "${HOME}/.zshrc" && source "${HOME}/.zshrc"
|
cat >> "${builtins.getEnv "HOME"}/.zshrc" <<EOF
|
||||||
|
export PATH="/Users/test/.cosmo/bin:\${builtins.getEnv "PATH"}"
|
||||||
|
EOF
|
||||||
|
source "${builtins.getEnv "HOME"}/.zshrc"
|
||||||
else
|
else
|
||||||
echo "Unsupported shell: $current_shell"
|
echo "Unsupported shell: $current_shell"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -82,17 +94,17 @@ pkgs.mkShell {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat <<'EOF'
|
cat <<'EOF'
|
||||||
.-.
|
.-.
|
||||||
`-'
|
`-'
|
||||||
___ LoRA
|
___ LoRA
|
||||||
.´ `'. _...._
|
.´ `'. _...._
|
||||||
: LLAMA : .' '.
|
: LLAMA : .' '.
|
||||||
'._____.' /`(o) (o)`\
|
'._____.' /`(o) (o)`\
|
||||||
_|_______|/ : : \
|
_|_______|/ : : \
|
||||||
[_____________/ '------' \
|
[_____________/ '------' \
|
||||||
/ o /
|
/ o /
|
||||||
`"`"|"`"`"`"`"`"`"`""=""===""`
|
`"`"|"`"`"`"`"`"`"`""=""===""`
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
echo "gm gm ⟁"
|
echo "gm gm ⟁"
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue