From c6709b5f2b35baa57f11e557d4baa96d6b9a54cf Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Mon, 6 Feb 2017 14:48:42 +0100 Subject: [PATCH] add installation script --- .gitignore | 5 ++--- install_clean.sh | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 3 deletions(-) create mode 100755 install_clean.sh diff --git a/.gitignore b/.gitignore index 0cbbe1b..e07a826 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,8 @@ Clean System Files mTask mTaskExamples sapl -mTask-data mTaskInterpret mTaskMakeSymbols -miTask-data -miTask-www +*-data +*-www miTask diff --git a/install_clean.sh b/install_clean.sh new file mode 100755 index 0000000..8d877a9 --- /dev/null +++ b/install_clean.sh @@ -0,0 +1,25 @@ +#!/bin/sh +set -e +if [ "$#" -eq 0 ]; +then + echo "Usage: $0 DIR" >&2 + exit 1; +fi +TARGET="$(realpath "$1")" +echo "Installing to $TARGET" +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" -- 2.20.1