Browse Source

Add a source command for reloading the path

tags/v0.3.7rc0
haixuanTao 1 year ago
parent
commit
bbe6649221
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      install.sh

+ 6
- 4
install.sh View File

@@ -199,8 +199,9 @@ if [ "$SHELL" = "/bin/bash" ]; then
if ! grep -q "$dest" ~/.bashrc; then if ! grep -q "$dest" ~/.bashrc; then
echo "Adding $dest to PATH in ~/.bashrc" echo "Adding $dest to PATH in ~/.bashrc"
echo "export PATH=\$PATH:$dest" >> ~/.bashrc echo "export PATH=\$PATH:$dest" >> ~/.bashrc
source ~/.bashrc
echo "Path added to ~/.bashrc and reloaded."
echo "Path added to ~/.bashrc."
echo "Please reload with:"
echo " source ~/.bashrc"
else else
echo "$dest is already in the PATH in ~/.bashrc" echo "$dest is already in the PATH in ~/.bashrc"
fi fi
@@ -208,8 +209,9 @@ elif [ "$SHELL" = "/bin/zsh" ]; then
if ! grep -q "$dest" ~/.zshrc; then if ! grep -q "$dest" ~/.zshrc; then
echo "Adding $dest to PATH in ~/.zshrc" echo "Adding $dest to PATH in ~/.zshrc"
echo "export PATH=\$PATH:$dest" >> ~/.zshrc echo "export PATH=\$PATH:$dest" >> ~/.zshrc
source ~/.zshrc
echo "Path added to ~/.zshrc and reloaded."
echo "Path added to ~/.zshrc."
echo "Please reload with:"
echo " source ~/.zshrc"
else else
echo "$dest is already in the PATH in ~/.zshrc" echo "$dest is already in the PATH in ~/.zshrc"
fi fi


Loading…
Cancel
Save