X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=install_clean.sh;h=f7fe903a9b5ed88ccdd4cdb4a76a5ea0b4919878;hb=14589b218e5796e4a85f2a73b440a25848ebe747;hp=654e45cf4331528b7a4731d03163934993c075eb;hpb=d3d05fd4650e0342b74e02f1698167c895c60c63;p=mTask.git diff --git a/install_clean.sh b/install_clean.sh index 654e45c..f7fe903 100755 --- a/install_clean.sh +++ b/install_clean.sh @@ -6,9 +6,16 @@ then exit 1; fi TARGET="$(realpath "$1")" + +echo "Removing and repopulating $TARGET" >&2 +if [ -d "$TARGET" ]; then + mv "$TARGET" "$TARGET.$(date +%F)" || rm -fr "$TARGET" +fi rm -fr "$TARGET" mkdir -p "$TARGET" + +echo "Downloading and installing clean nightly" >&2 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" + | tar --gunzip --strip-components=1 --extract --directory="$TARGET" -echo "export CLEAN_HOME=$TARGET; export PATH=$TARGET:\$PATH;" +echo "export CLEAN_HOME=$TARGET; export PATH=$TARGET/bin:\$PATH;"