Browse Source

Use -z $BASH to detect bash script

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

+ 1
- 4
install.sh View File

@@ -195,10 +195,7 @@ else
echo ""
fi

read -p "Do you want to add $dest to your PATH automatically? (y/n): " response

if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]; then
if [ "$SHELL" = "/bin/bash" ]; then
if [ -z "$BASH" ]; then
if ! grep -q "$dest" ~/.bashrc; then
echo "Adding $dest to PATH in ~/.bashrc"
echo "export PATH=\$PATH:$dest" >> ~/.bashrc


Loading…
Cancel
Save