From da6795515be9b2bcb209cf52a38ec7e025f04b95 Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Mon, 1 Oct 2007 23:02:55 -0500 Subject: Integrity check on upload Ths is a little patch to check the integrity of the uploaded file after uploading it. It will avoid problems like the ones with kernel26 or openoffice-base recently. Signed-off-by: Aaron Griffin --- extrapkg | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extrapkg b/extrapkg index 58c6095..36103b9 100755 --- a/extrapkg +++ b/extrapkg @@ -46,6 +46,12 @@ fi if [ "$repo" != "community" ]; then scp $pkgfile archlinux.org:staging/$repo/add + if [ "$(md5sum $pkgfile | cut -d' ' -f1)" != "$(ssh archlinux.org md5sum staging/${repo}/add/$pkgfile | cut -d' ' -f1)" ]; then + echo "File got corrupted during upload, cancelled." + exit 1 + else + echo "File integrity okay." + fi else if [ ! -f ~/.tupkg ]; then echo "Must configure tupkg via ~/.tupkg, cancelled" -- cgit v1.2.3-24-g4f1b