]> Sergey Matveev's repositories - godlighty.git/commitdiff
default target with extension is more reliable
authorSergey Matveev <stargrave@stargrave.org>
Thu, 25 Dec 2025 16:44:29 +0000 (19:44 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 25 Dec 2025 16:48:10 +0000 (19:48 +0300)
default.cmd.do [moved from default.do with 67% similarity]
make-update

similarity index 67%
rename from default.do
rename to default.cmd.do
index 82e6356189f0ea8e12f949e6fa89d94a66a48c3f..cf6e228044d15384949a2c95685df9962cfcdecc 100644 (file)
@@ -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
index 618fd6128ebd999740034d20301cb55ef0b87e5e..c74b8157cb9a7945123689044aefa98c2dbe928a 100755 (executable)
@@ -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 <<EOF
 #!/bin/sh -ex
 w=\$1