From 42cf04472f2a78c7f3788532da9cb94184eb54f1 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Wed, 6 Oct 2021 17:19:34 +0300 Subject: [PATCH] Simple bsdiff-based updater --- make-update.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 make-update.sh diff --git a/make-update.sh b/make-update.sh new file mode 100755 index 0000000..5cf764a --- /dev/null +++ b/make-update.sh @@ -0,0 +1,34 @@ +#!/bin/sh -ex + +w=$1 +[ -n "$w" ] +[ -d rc/$w.cfg ] +redo $w +mkdir -p updates +[ -s updates/$w.old ] || { + echo This is first run + mv $w updates/$w.old + exit +} +bsdiff updates/$w.old $w updates/$w.bsdiff +mv updates/$w.old updates/$w.older +mv $w updates/$w.old +cat > updates/$w-update.sh <> updates/$w-update.sh +chmod +x updates/$w-update.sh -- 2.44.0