git.iko.soy/typeable/servant
on v0.6 help sign in
typeable/servant/scripts/start-sandbox.sh
26 lines 682 B history raw
1#!/usr/bin/env bash
2#===============================================================================
3#
4# FILE: start-sandbox.sh
5#
6# USAGE: ./start-sandbox.sh
7#
8# DESCRIPTION: Create sandbox at top-level and add all packages as add-source
9#
10# REQUIREMENTS: bash >= 4
11#===============================================================================
13set -o nounset
14set -o errexit
16DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
17. "$DIR"/lib/common.sh
19prepare_sandbox () {
20 $CABAL sandbox init
21 for s in ${SOURCES[@]} ; do
22 (cd "$s" && $CABAL sandbox init --sandbox=../.cabal-sandbox && $CABAL sandbox add-source .)
23 done
26prepare_sandbox