瀏覽代碼

Allow start.sh from any working directory

This change to start.sh allows it to be executed from any working directory and always reference the gogs binary in the parent directory. Very helpful when calling start.sh from an init script.
Clint Armstrong 10 年之前
父節點
當前提交
eae08ea8f4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      scripts/start.sh

+ 1 - 1
scripts/start.sh

@@ -12,4 +12,4 @@ USER=$(whoami)
 HOME=$(grep "^$USER:" /etc/passwd | cut -d: -f6)
 export USER HOME PATH
 
-cd "$(pwd)" && exec ./gogs web
+cd "$(dirname "$0")/.." && exec ./gogs web