From 49adf3f5377dd412a7f2bd68f7031355b44dd939 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 26 Jun 2014 00:18:36 -0400 Subject: updatesums.sh: New file. --- diff --git a/updatesums.sh b/updatesums.sh new file mode 100755 index 0000000..5f2e610 --- /dev/null +++ b/updatesums.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +set -eu + +newsums="$(ssh files@files.proteanos.com sh -c \ + "\"sha256sum files/pub/proteanos/feeds/dev/trunk/*/*/*/Packages | sed \ + 's| files/pub/proteanos/feeds/dev/trunk/||; s|/|_|g; s|_Packages||'\"")" + +exec 3>miniprokit.sh~ +sed -n '0,/^-- NEW SUMS --$/{ p; };' miniprokit.sh >&3 +printf '%s\n' "${newsums}" >&3 +sed -n '/^-- NEW SUMS --$/,/^-- OLD SUMS --$/{ /OLD/d; s/NEW/OLD/; p; };' \ + miniprokit.sh >&3 +sed -n '/^-- END SUMS --$/,${ p; };' miniprokit.sh >&3 +exec 3>&- + +cat miniprokit.sh~ >miniprokit.sh +rm miniprokit.sh~ -- cgit v0.9.1