diff --git a/make-go.bash b/make-go.bash index f85702c5..79c80d14 100755 --- a/make-go.bash +++ b/make-go.bash @@ -70,12 +70,20 @@ if [ ! -e ../VERSION ]; then echo "$(git describe --tags)" > ../VERSION fi -./make.bash --no-banner +BUILDER_EXT=bash +case "$(uname)" in + *MINGW* | *WIN32* | *CYGWIN*) + BUILDER_EXT=bat + ;; +esac + +./make.${BUILDER_EXT} --no-banner + cp -a ../bin "${GOROOT_FINAL}"/ cp -a ../pkg "${GOROOT_FINAL}"/ cp -a ../src "${GOROOT_FINAL}"/ -if [[ -e ./make.bash ]]; then +if [[ -e ./make.${BUILDER_EXT} ]]; then pushd ../ git clean -f popd diff --git a/make-syncthing.bash b/make-syncthing.bash index 267ac602..d4b50188 100755 --- a/make-syncthing.bash +++ b/make-syncthing.bash @@ -35,6 +35,12 @@ unset GOPATH #Set by build.go export GOROOT=${MYDIR}/ext/golang/dist/go-${GOOS}-${GOARCH} export PATH=${GOROOT}/bin:${PATH} +case "$(uname)" in + *CYGWIN*) + export GOROOT=`cygpath -w $GOROOT` + ;; +esac + pushd ext/syncthing/src/github.com/syncthing/syncthing _GOOS=$GOOS