diff --git a/start.sh b/start.sh index e9b594c..99d1638 100755 --- a/start.sh +++ b/start.sh @@ -30,8 +30,7 @@ if ss -tlnp 2>/dev/null | grep -q ":$PORT "; then fi # 编译(如果源码或嵌入文件有变更) -WEB_FILES=$(find web/static -name '*.html' -o -name '*.js' -o -name '*.css' 2>/dev/null) -if [ ! -x "$BIN" ] || [ -n "$(find . -name '*.go' $WEB_FILES -newer "$BIN" 2>/dev/null | head -1)" ]; then +if [ ! -x "$BIN" ] || [ -n "$(find . -name '*.go' -newer "$BIN" 2>/dev/null | head -1)" ] || [ -n "$(find web/static -newer "$BIN" 2>/dev/null | head -1)" ]; then echo "[start] 编译新二进制..." go build -o "$BIN" . 2>&1 fi