diff options
Diffstat (limited to 'updatesums.sh')
-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~ |