From: Sergey Matveev Date: Wed, 6 Oct 2021 14:19:34 +0000 (+0300) Subject: Simple bsdiff-based updater X-Git-Url: http://www.git.stargrave.org/?p=godlighty.git;a=commitdiff_plain;h=42cf04472f2a78c7f3788532da9cb94184eb54f1 Simple bsdiff-based updater --- 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