aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Roxell <anders.roxell@linaro.org>2014-12-23 00:47:44 +0100
committerAnders Roxell <anders.roxell@linaro.org>2014-12-23 00:47:44 +0100
commit0ac2405dd9bedf21734fa53aa32bcbe18a8c77af (patch)
treec1892db6956b4ee4e75262d0b3ca24478e90853d
parente1b4c81bb0e677ffcb0293e8e1ee305a5039ab75 (diff)
make-ssc.sh: add cleanup switch
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
-rwxr-xr-xmake-ssc.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/make-ssc.sh b/make-ssc.sh
index 4523acb..c837a61 100755
--- a/make-ssc.sh
+++ b/make-ssc.sh
@@ -6,12 +6,14 @@ export ODP_DIR="${ODP_DIR:-${ROOT_DIR}/odp}"
export GIT_ODP="${GIT_ODP:-git://git.linaro.org/lng/odp.git}"
export GIT_BRANCH="${GIT_BRANCH:-master}"
export TESTS=${TESTS:-clang}
+export CLEANUP="${CLEANUP:-1}"
usage() {
echo -e "$0 makes use of the following environment variables,"
echo -e "\tGIT_ODP:\twhich ODP git repo to use"
echo -e "\tGIT_BRANCH:\twhich branch to checkout and test"
echo -e "\tTESTS:\t\twhich test to run (clang/sparse/smatch), default: clang"
+ echo -e "\tCLEANUP:\t to save workspace set CLEANUP=0, default: ${CLEANUP}"
}
if [[ "x$1" = "x-h" || "x$1" = "x--help" ]]; then
@@ -23,7 +25,9 @@ trap cleanup_exit INT TERM EXIT
cleanup_exit()
{
- rm -rf ${ODP_DIR}
+ if [[ ${CLEANUP} -eq 1 ]]; then
+ rm -rf ${ODP_DIR}
+ fi
}
git clone --depth 1 -b ${GIT_BRANCH} ${GIT_ODP} ${ODP_DIR}