aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build.sh10
-rw-r--r--scripts/systemd/gogs.service2
2 files changed, 9 insertions, 3 deletions
diff --git a/scripts/build.sh b/scripts/build.sh
index ea43bdaf..cf127c2a 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/
diff --git a/scripts/systemd/gogs.service b/scripts/systemd/gogs.service
index 7436e46a..95567eaa 100644
--- a/scripts/systemd/gogs.service
+++ b/scripts/systemd/gogs.service
@@ -14,7 +14,7 @@ Group=git
WorkingDirectory=/home/git/gogs
ExecStart=/home/git/gogs/gogs web
Restart=always
-Environment="USER=git","HOME=/home/git"
+Environment=USER=git HOME=/home/git
[Install]
WantedBy=multi-user.target