31 lines
827 B
Bash
Executable file
31 lines
827 B
Bash
Executable file
#!/bin/sh
|
|
# Script to build git-annex on windows. Run by build.bat
|
|
# Does not currently build the NSIS installer. See build.sh for how to do
|
|
# that.
|
|
|
|
set -e
|
|
set -x
|
|
|
|
# Path to the Haskell Platform.
|
|
HP="/c/Program Files/Haskell Platform/2013.2.0.0"
|
|
|
|
PATH="$HP/bin:$HP/lib/extralibs/bin:$PATH"
|
|
|
|
# Run a command with the cygwin environment available.
|
|
# However, programs not from cygwin are preferred.
|
|
withcyg () {
|
|
PATH="$PATH:/c/cygwin/bin" "$@"
|
|
}
|
|
|
|
# Install haskell dependencies.
|
|
# cabal install is not run in cygwin, because we don't want configure scripts
|
|
# for haskell libraries to link them with the cygwin library.
|
|
cabal install --only-dependencies || true
|
|
|
|
# Build git-annex
|
|
if [ ! -e "dist/setup-config" ]; then
|
|
withcyg cabal configure
|
|
fi
|
|
withcyg cabal build || true
|
|
ghc --make Build/EvilLinker
|
|
withcyg Build/EvilLinker
|