Skip to content

Commit 9cf334f

Browse files
committed
Merge pull request #1185 from linquize/build-win
Update build.sh for Windows
2 parents e69f09f + 08f7547 commit 9cf334f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/build.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ rm -rf $outPath
44
mkdir $outPath
55

66
go build ../gogs.go
7-
chmod +x gogs
8-
mv gogs $outPath/
7+
PLATFORM=`uname | cut -d _ -f 1`
8+
if [ $PLATFORM = "MINGW32" ] || [ $PLATFORM = "MINGW64" ] || [ $PLATFORM = "CYGWIN" ]; then
9+
GOGS_EXE=gogs.exe
10+
else
11+
GOGS_EXE=gogs
12+
fi
13+
chmod +x $GOGS_EXE
14+
mv $GOGS_EXE $outPath/
915

1016
cp -r ../conf/ $outPath/conf/
1117
cp -r ../custom/ $outPath/custom/

0 commit comments

Comments
 (0)