2013-12-06 00:40:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Script to build git-annex on windows. Run by build.bat
|
|
|
|
|
|
|
|
set -e
|
2013-12-06 01:02:27 +00:00
|
|
|
set -x
|
2013-12-06 00:40:28 +00:00
|
|
|
|
2015-09-01 22:05:15 +00:00
|
|
|
PATH="/c/Program Files/Git/cmd:/c/Program Files/NSIS:$PATH"
|
2013-12-06 00:40:28 +00:00
|
|
|
|
|
|
|
# Run a command with the cygwin environment available.
|
|
|
|
# However, programs not from cygwin are preferred.
|
|
|
|
withcyg () {
|
|
|
|
PATH="$PATH:/c/cygwin/bin" "$@"
|
|
|
|
}
|
2017-10-17 17:00:29 +00:00
|
|
|
|
|
|
|
# Prefer programs from cygwin.
|
2013-12-11 15:23:34 +00:00
|
|
|
withcygpreferred () {
|
|
|
|
PATH="/c/cygwin/bin:$PATH" "$@"
|
|
|
|
}
|
2013-12-06 00:40:28 +00:00
|
|
|
|
2017-10-17 17:00:29 +00:00
|
|
|
# Deps are not built with cygwin environment, because we don't want
|
|
|
|
# configure scripts for haskell libraries to link them with the cygwin
|
|
|
|
# libraries.
|
|
|
|
stack setup
|
|
|
|
stack build --dependencies-only
|
2013-12-06 00:40:28 +00:00
|
|
|
|
|
|
|
# Build git-annex
|
2017-10-17 17:00:29 +00:00
|
|
|
withcyg stack build
|
2013-12-10 04:45:21 +00:00
|
|
|
|
|
|
|
# Build the installer
|
2017-10-17 17:00:29 +00:00
|
|
|
withcygpreferred stack runghc --package nsis Build/NullSoftInstaller.hs
|