git @ Cat's Eye Technologies The-Cannery / ade974c
Merge pull request #3 from catseye/x-hastec x-hastec Chris Pressey authored 1 year, 8 months ago GitHub committed 1 year, 8 months ago
4 changed file(s) with 48 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
0 #!/bin/sh
1
2 IMAGENAME=x-hastec
3
4 SCRIPTPATH=`realpath $0`
5 SCRIPTDIR=`dirname $SCRIPTPATH`
6 . $SCRIPTDIR/../contrib/$IMAGENAME/settings.sh
7 IMAGE=$ORGNAME/$IMAGENAME:$VERSION
8
9 docker run --user $(id -u):$(id -g) -e HOME=/root -i -t -v "${PWD}:/src" $IMAGE $EXENAME "$@"
0 FROM rwstauner/haste-compiler
1 RUN haste-cabal update && \
2 haste-cabal install parsec-3.1.1 && \
3 rm -rf /root/.cabal && \
4 chmod -R +x /root && \
5 chmod +r /root
0 ORGNAME=catseye
1 SOURCE=
2 EXENAME=hastec
3 IMAGENAME=x-hastec
4 VERSION=0.5.5.1-ce1
2222 return 1
2323 }
2424
25 if shelf_pwd ${SOURCE}; then
26 GITDIR=`shelf_pwd ${SOURCE}`
27 else
28 echo "Please set SHELF_PATH to a directory where the source '${SOURCE}' can be found."
29 exit 1
25 ORGNAME=catseye
26 DOCKERFILE=$CONFIG_DIR/Dockerfile
27 if [ "x$IMAGENAME" = "x" ]; then
28 IMAGENAME=$EXENAME
3029 fi
3130
32 ORGNAME=catseye
33 DOCKERFILE=$CONFIG_DIR/Dockerfile
34 IMAGENAME=$EXENAME
31 if [ "x$SOURCE" != "x" ]; then
32 if [ "x$SHELF_PATH" != "x" ]; then
33 if shelf_pwd ${SOURCE}; then
34 GITDIR=`shelf_pwd ${SOURCE}`
35 else
36 echo "Please set SHELF_PATH to a directory where the source '${SOURCE}' can be found."
37 exit 1
38 fi
39 else
40 GITDIR="https://github.com/$ORGNAME/$SOURCE"
41 fi
42 else
43 # If GITDIR is blank, this image does not require a repository when building
44 GITDIR=""
45 fi
3546
36 SRCDIR=/tmp/$EXENAME
37
38 echo "Cloning ${GITDIR} to ${SRCDIR} ..."
47 SRCDIR=/tmp/$IMAGENAME
3948
4049 rm -rf ${SRCDIR}
41 (cd /tmp/ && git clone ${GITDIR} ${EXENAME})
50 if [ "x$GITDIR" != "x" ]; then
51 echo "Cloning ${GITDIR} to ${SRCDIR} ..."
52 (cd /tmp/ && git clone ${GITDIR} ${IMAGENAME})
53 else
54 echo "No SOURCE specified in settings.sh, using empty ${SRCDIR} ..."
55 mkdir -p $SRCDIR
56 fi
4257
4358 if [ -x "${CONFIG_DIR}/patch.sh" ]; then
4459 PATCHFILE=`pwd`"/${CONFIG_DIR}/patch.sh"