Pārlūkot izejas kodu

Update build.sh for Windows

Linquize 10 gadi atpakaļ
vecāks
revīzija
08f7547acf
1 mainītis faili ar 8 papildinājumiem un 2 dzēšanām
  1. 8 2
      scripts/build.sh

+ 8 - 2
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/