- Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathshake
More file actions
executable file
·28 lines (23 loc) · 826 Bytes
/
shake
File metadata and controls
executable file
·28 lines (23 loc) · 826 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
#!/bin/sh
env_file="config/env.sh"
# Configure environment
if [ -f "$env_file" ]; then
# Check whether env file is owned by and only writable by user
if [ -O "$env_file" ] && ls -l "$env_file" | grep -qe "^-...[-r]-[-x][-r]-[-x]"; then
set -a # auto export variables
source "${env_file}"
else
echo "For security reasons, the environment file \"$env_file\"" 1>&2
echo "should be owned by and writable by you and you only." 1>&2
exit 1
fi
fi
stack=`which stack`
if [ -z "$stack" ]; then
echo "stack not found in \$PATH, please install from http://haskellstack.org" 1>&2
exit 1
fi
# Build the build system.
"$stack" build --no-system-ghc --install-ghc || exit 1
# Execute build system.
`"$stack" path --local-install-root`/bin/methcla-shakefile "$@" || exit 1