diff --git a/scripts/install/debian.sh b/scripts/install/debian.sh index ea3761dd6..aa9449b76 100644 --- a/scripts/install/debian.sh +++ b/scripts/install/debian.sh @@ -12,6 +12,10 @@ LANG=en_US.UTF-8 # WHITE='\e[1;37m' # 白色 # NC='\e[0m' # 没有颜色 +if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then + ln -sf /bin/bash /bin/sh +fi + apt update -y diff --git a/scripts/install/ubuntu.sh b/scripts/install/ubuntu.sh index 6d4a66c2e..7b07815e1 100644 --- a/scripts/install/ubuntu.sh +++ b/scripts/install/ubuntu.sh @@ -3,6 +3,11 @@ PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH LANG=en_US.UTF-8 +if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then + sudo ln -sf /bin/bash /bin/sh + #sudo dpkg-reconfigure dash +fi + apt update -y diff --git a/scripts/lib.sh b/scripts/lib.sh index 5763c5b7b..b4806b295 100755 --- a/scripts/lib.sh +++ b/scripts/lib.sh @@ -222,14 +222,6 @@ echo -e "Install_Curl" >> ${libPath}/lib.pl } -if grep -Eq "Ubuntu" /etc/*-release && [ ! -f /bin/sh ]; then - sudo ln -sf /bin/bash /bin/sh - #sudo dpkg-reconfigure dash -fi - -if grep -Eq "Debian" /etc/*-release && [ ! -f /bin/sh ]; then - ln -sf /bin/bash /bin/sh -fi _os=`uname` if [ ${_os} == "Darwin" ]; then