-
Notifications
You must be signed in to change notification settings - Fork 1
/
sandbox-setup.sh
executable file
·36 lines (30 loc) · 991 Bytes
/
sandbox-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Prompts user to remove existing cabal sandbox
function rmsandbox() {
if [[ -d .cabal-sandbox ]]; then
while true; do
read -p "Remove existing cabal sandbox [y/n]? " yn
case $yn in
[Yy]* ) cabal sandbox delete; break;;
[Nn]* ) return;;
* ) echo "Please answer y or n.";;
esac
done
fi
}
## SETUP MAIN SANDBOX
# Initialize Cabal sandbox and add modules as source dependencies
rmsandbox
cabal sandbox init
cabal sandbox add-source modules/algebra-dag
cabal sandbox add-source modules/algebra-sql
cabal sandbox add-source modules/dsh
cabal sandbox add-source modules/dsh-example-queries
cabal sandbox add-source modules/dsh-sql
## SETUP DSH SANDBOX
echo "================== Setting up DSH sandbox ==================="
cd modules/dsh
# Initialize Cabal sandbox and add modules as source dependencies
rmsandbox
cabal sandbox init
cabal sandbox add-source ../algebra-dag