X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=install_clean.sh;h=e21a1c672eb1b3ca8617f82ace71c910a2acc90f;hb=0781ce1e845d7ec4bd06a39105d5d0d68835c693;hp=8d877a9e368c0f3dd00227970e4865b3cbc188c8;hpb=c6709b5f2b35baa57f11e557d4baa96d6b9a54cf;p=mTask.git diff --git a/install_clean.sh b/install_clean.sh index 8d877a9..e21a1c6 100755 --- a/install_clean.sh +++ b/install_clean.sh @@ -6,20 +6,12 @@ then exit 1; fi TARGET="$(realpath "$1")" -echo "Installing to $TARGET" +if [ -d "$TARGET" ]; then + mv "$TARGET" "$TARGET.$(date +%F)" +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 -if ! hash clm; then - if [ "$(which clm)" != "$TARGET/bin" ]; then - echo "Replace the old clm path with \$CLEAN_HOME/bin in PATH" - else - echo "Add \$CLEAN_HOME/bin to your PATH" - fi -fi -echo "Done" +echo "export CLEAN_HOME=$TARGET; export PATH=$TARGET/bin:\$PATH;"