X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=install_clean.sh;h=63bcb5e725e3e6bb7be09426b7591cdfa03d2e4f;hb=bdebf34a1e281db5b2de64d5dd177cf7ea5cee51;hp=ca77a866d19f9716305a894e42723f314565cf05;hpb=bd1040e99add38ee8c7ce7e2ec2ade8de55f17bc;p=mTask.git diff --git a/install_clean.sh b/install_clean.sh index ca77a86..63bcb5e 100755 --- a/install_clean.sh +++ b/install_clean.sh @@ -6,13 +6,12 @@ then exit 1; fi TARGET="$(realpath "$1")" +if [ -d "$TARGET" ]; then + mv "$TARGET" "$TARGET.$(date +%F)" || rm -fr "$TARGET" +fi rm -fr "$TARGET" mkdir -p "$TARGET" curl -sSL ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz \ | gunzip | tar --strip-components=1 --extract --directory="$TARGET" -if [ "$CLEAN_HOME" != "$TARGET" ]; then - echo "Add or change \$CLEAN_HOME to \"$TARGET\"" -fi -echo "CLEAN_HOME=$TARGET" -echo "PATH=$TARGET:\$PATH" +echo "export CLEAN_HOME=$TARGET; export PATH=$TARGET/bin:\$PATH;"