on master help sign in
clean-old-stack-libs.sh: pushd to show dir and run stack script

- bail if error - make shell script executable instead

commitca686bacd18c2a95a314a23b95e0a708ca42aba8 authorJens Petersen <juhpetersen@gmail.com> dateTue 19 May 2020, 15:24 (6 years ago) parent95b3cae
2 files changed+6−2
etc/diskspace/clean-old-stack-libs.sh+6−2 etc/diskspace/remove-old-stack-work-libs.hs
etc/diskspace/clean-old-stack-libs.shmode 100644 → 100755+6−2
@@ -1,10 +1,14 @@
11#!/bin/sh
22
3+set -e
4+
35if [ $# != 1 ]; then
46 echo "Usage: $0 [nightly|lts-xx]"
57 exit 1
68fi
79
8−popd ~/stackage/automated/work/$1/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-*
10+SRCDIR=$(dirname $0)
11+
12+pushd ~/stackage/automated/work/$1/unpack-dir/.stack-work/install/x86_64-linux/*/*/lib/x86_64-linux-ghc-*
913
10−~/stackage/etc/diskspace/remove-old-stack-work-libs.hs
14+stack --resolver lts-14 script ${SRCDIR}/remove-old-stack-work-libs.hs
etc/diskspace/remove-old-stack-work-libs.hsmode 100755 → 100644

Only the mode changed.