From: Sergey Matveev Date: Thu, 25 Dec 2025 16:44:29 +0000 (+0300) Subject: default target with extension is more reliable X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=5b00e2e294adef67f8f1aea5170745f5e5249f3e;p=godlighty.git default target with extension is more reliable --- diff --git a/default.do b/default.cmd.do similarity index 67% rename from default.do rename to default.cmd.do index 82e6356..cf6e228 100644 --- a/default.do +++ b/default.cmd.do @@ -1,8 +1,8 @@ -[ -d rc/"$1".cfg ] || { - echo No rc/"$1".cfg found >&2 +[ -d rc/"$2".cfg ] || { + echo No rc/"$2".cfg found >&2 exit 1 } rm -f rc/cfg -ln -s $1.cfg rc/cfg +ln -s $2.cfg rc/cfg redo-ifchange cmd/godlighty/*.go *.go go.* rc/*.go rc/mime/* rc/cfg/*.go ${GO:-go} build -o $3 $GO_FLAGS -ldflags=-s ./cmd/godlighty diff --git a/make-update b/make-update index 618fd61..c74b815 100755 --- a/make-update +++ b/make-update @@ -3,17 +3,17 @@ w=$1 [ -n "$w" ] [ -d rc/$w.cfg ] -redo $w +redo $w.cmd mkdir -p updates [ -s updates/$w.old ] || { echo This is first run - mv $w updates/$w.old + mv $w.cmd updates/$w.old exit } rm -f updates/$w.patch.zst -zstd -19 --patch-from updates/$w.old -o updates/$w.patch.zst $w +zstd -19 --patch-from updates/$w.old -o updates/$w.patch.zst $w.cmd mv updates/$w.old updates/$w.older -mv $w updates/$w.old +mv $w.cmd updates/$w.old cat >updates/$w-update.sh <