From cd3a63d240fd9e0045a0571da4b6229d5db9f53d Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Thu, 20 Feb 2025 15:06:03 +0300 Subject: [PATCH] More portable zstd instead of bsdiff --- doc/index.texi | 3 ++- make-update | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/doc/index.texi b/doc/index.texi index 65cbe8d..b0b51ab 100644 --- a/doc/index.texi +++ b/doc/index.texi @@ -62,7 +62,8 @@ Can drop (UID, GID, groups) privileges. Basically all configuration is done directly inside source code. You have to recompile it every time configuration changes. Is it a problem? I doubt, because Go is very fast. But it produces huge statically linked -executables, you say! Use @command{bsdiff}/@command{bspatch}! +executables, you say! Use either @command{bsdiff}/@command{bspatch} or +@command{zstd --patch-from}! It is created exclusively to drive my own websites, but if you are interested, then @code{git clone git://git.stargrave.org/godlighty.git} it. diff --git a/make-update b/make-update index 325444f..7d56c11 100755 --- a/make-update +++ b/make-update @@ -10,26 +10,26 @@ mkdir -p updates mv $w updates/$w.old exit } -bsdiff updates/$w.old $w updates/$w.bsdiff +zstd -19 --patch-from updates/$w.old -o updates/$w.patch.zst $w mv updates/$w.old updates/$w.older mv $w updates/$w.old -cat > updates/$w-update.sh <updates/$w-update.sh <> updates/$w-update.sh +b64encode updates/$w.patch.zst >updates/$w-update.sh chmod +x updates/$w-update.sh -- 2.48.1