forked from haskell/haskell-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform.sh
More file actions
executable file
·42 lines (34 loc) · 1012 Bytes
/
platform.sh
File metadata and controls
executable file
·42 lines (34 loc) · 1012 Bytes
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
37
38
39
40
41
42
#!/bin/sh
#for OS X in particular
export MACOSX_DEPLOYMENT_TARGET=10.7
set -e
HPTOOL=hptool/dist-newstyle/build/hptool-0.1/build/hptool/hptool
HPTOOL_ALT=hptool/.cabal-sandbox/bin/hptool
#if ( cabal sandbox --help >/dev/null 2>&1 ) ; then
# if [ \! -d hptool/.cabal-sandbox ]
# then
# echo '***'
# echo '*** Setting up sandbox for hptool'
# echo '***'
# cabal update
# (cd hptool; cabal sandbox init; cabal install --only-dependencies)
# fi
#else
# if ( cabal install --dry-run --only-dependencies | grep -q 'would be installed' ) ; then
# echo '=== pre-requisite packages for hptool are not installed'
# echo ' run the following:'
# echo ' cd hptool ; cabal install --only-dependencies'
# exit 1
# fi
#fi
echo '***'
echo '*** Building hptool'
echo '***'
(cd hptool; cabal new-build)
if [ "$HPTOOL_ALT" -nt "$HPTOOL" ] ; then
HPTOOL="$HPTOOL_ALT"
fi
echo '***'
echo '*** Running hptool'
echo '***'
exec $HPTOOL "$@"