From 508a2e0b9781f5fc74bb71e4dc4bac52f817fc86 Mon Sep 17 00:00:00 2001 From: pvincent Date: Sat, 27 Feb 2021 20:51:16 +0400 Subject: [PATCH] fix debian-bash as link --- install.sh | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index 61d20ec..63ac415 100755 --- a/install.sh +++ b/install.sh @@ -17,22 +17,29 @@ function install_host { if [[ ! $BASEDIR == '/opt/debian-bash' ]]; then # download and filfull /opt/debian-bash, then run it from folder - rm -rf /opt/debian-bash - TEMP=`mktemp -d` - cd $TEMP - echo $TEMP - wget https://git.artcode.re/pvincent/debian-bash/archive/master.tar.gz - tar -xzf master.tar.gz - mv debian-bash /opt/ - cd /opt/debian-bash - ./install.sh $PARAM1 - rm -rf $TEMP - exit 0 + if [[ -L /opt/debian-bash ]];then + cd /opt/debian-bash + git pull + ./install.sh $PARAM1 + exit 0 + else + rm -rf /opt/debian-bash + TEMP=`mktemp -d` + cd $TEMP + echo $TEMP + wget https://git.artcode.re/pvincent/debian-bash/archive/master.tar.gz + tar -xzf master.tar.gz + mv debian-bash /opt/ + cd /opt/debian-bash + ./install.sh $PARAM1 + rm -rf $TEMP + exit 0 + fi else #remove /etc/skel/.bashrc - if [ -e /etc/skel/.bashrc ]; then + if [ -e /etc/skel/.bashrc ]; then rm /etc/skel/.bashrc fi