From 08f7547acf40c20eaaaaae3fdfc7835020d7d945 Mon Sep 17 00:00:00 2001 From: Linquize Date: Sat, 4 Apr 2015 19:23:53 +0800 Subject: [PATCH] Update build.sh for Windows --- scripts/build.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build.sh b/scripts/build.sh index ea43bdafc..cf127c2ae 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -4,8 +4,14 @@ rm -rf $outPath mkdir $outPath go build ../gogs.go -chmod +x gogs -mv gogs $outPath/ +PLATFORM=`uname | cut -d _ -f 1` +if [ $PLATFORM = "MINGW32" ] || [ $PLATFORM = "MINGW64" ] || [ $PLATFORM = "CYGWIN" ]; then + GOGS_EXE=gogs.exe +else + GOGS_EXE=gogs +fi +chmod +x $GOGS_EXE +mv $GOGS_EXE $outPath/ cp -r ../conf/ $outPath/conf/ cp -r ../custom/ $outPath/custom/