servant/scripts/start-sandbox.sh

27 lines
682 B
Bash
Raw Permalink Normal View History

2015-12-25 15:50:28 +01:00
#!/usr/bin/env bash
2015-05-02 03:21:03 +02:00
#===============================================================================
#
# FILE: start-sandbox.sh
#
# USAGE: ./start-sandbox.sh
#
# DESCRIPTION: Create sandbox at top-level and add all packages as add-source
#
# REQUIREMENTS: bash >= 4
#===============================================================================
set -o nounset
set -o errexit
2015-06-05 15:08:52 +02:00
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
. "$DIR"/lib/common.sh
2015-05-02 03:21:03 +02:00
prepare_sandbox () {
$CABAL sandbox init
for s in ${SOURCES[@]} ; do
(cd "$s" && $CABAL sandbox init --sandbox=../.cabal-sandbox && $CABAL sandbox add-source .)
done
}
prepare_sandbox