diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-06-26 00:18:36 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-06-26 00:18:36 (EDT) |
commit | 49adf3f5377dd412a7f2bd68f7031355b44dd939 (patch) | |
tree | 56587211b50a169499707bf853778180ba0cab71 | |
parent | 7bedc44f4670b0b991e87d263a4f0e6cdc3f1c87 (diff) |
updatesums.sh: New file.
-rwxr-xr-x | updatesums.sh | 18 |
1 files changed, 18 insertions, 0 deletions
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~ |