on master help sign in
Cleaner dir structure
0fecc4eMichael Snoyman
automated/build.sh+9−9
@@ -5,7 +5,7 @@ set -eu +x -o pipefail
5ROOT=$(cd $(dirname $0) ; pwd)
5ROOT=$(cd $(dirname $0) ; pwd)
6TARGET=$1
6TARGET=$1
7
7
8−source aws.sh
8+source work/aws.sh
9
9
10# For nightly-YYYY-MM-DD, tag should be nightly
10# For nightly-YYYY-MM-DD, tag should be nightly
11# For lts-X.Y, tag should be ltsX
11# For lts-X.Y, tag should be ltsX
@@ -21,11 +21,11 @@ fi
21
21
22IMAGE=commercialhaskell/stackage:$TAG
22IMAGE=commercialhaskell/stackage:$TAG
23
23
24−PANTRY_DIR=$ROOT/stack/pantry
24+PANTRY_DIR=$ROOT/work/stack/pantry
25−STACK_DIR=$ROOT/stack
25+STACK_DIR=$ROOT/work/stack
26−DOT_STACKAGE_DIR=$ROOT/dot-stackage
26+DOT_STACKAGE_DIR=$ROOT/work/dot-stackage
27# ssh key is used for committing snapshots (and their constraints) to Github
27# ssh key is used for committing snapshots (and their constraints) to Github
28−SSH_DIR=$ROOT/ssh
28+SSH_DIR=$ROOT/work/ssh
29USERID=$(id -u)
29USERID=$(id -u)
30
30
31mkdir -p \
31mkdir -p \
@@ -35,14 +35,14 @@ mkdir -p \
35 "$WORKDIR" \
35 "$WORKDIR" \
36 "$SSH_DIR"
36 "$SSH_DIR"
37
37
38−GITCONFIG=$ROOT/gitconfig
38+GITCONFIG=$ROOT/work/gitconfig
39cat >$GITCONFIG <<EOF
39cat >$GITCONFIG <<EOF
40[user]
40[user]
41 email = michael+stackage-build@fpcomplete.com
41 email = michael+stackage-build@fpcomplete.com
42 name = Stackage Build host
42 name = Stackage Build host
43EOF
43EOF
44
44
45−HACKAGE_CREDS=$ROOT/hackage-creds
45+HACKAGE_CREDS=$ROOT/work/hackage-creds
46
46
47function require_400_file {
47function require_400_file {
48 if [ ! -f "$1" ]
48 if [ ! -f "$1" ]
@@ -57,8 +57,8 @@ function require_400_file {
57require_400_file "$SSH_DIR/id_rsa"
57require_400_file "$SSH_DIR/id_rsa"
58require_400_file "$HACKAGE_CREDS"
58require_400_file "$HACKAGE_CREDS"
59
59
60−mkdir -p $ROOT/bin
60+mkdir -p $ROOT/work/bin
61−BINDIR=$(cd $ROOT/bin ; pwd)
61+BINDIR=$(cd $ROOT/work/bin ; pwd)
62(
62(
63cd $BINDIR
63cd $BINDIR
64rm -f curator stack *.bz2
64rm -f curator stack *.bz2