Commit da679551 authored by Thomas Bächler's avatar Thomas Bächler Committed by Aaron Griffin
Browse files

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: default avatarAaron Griffin <aaronmgriffin@gmail.com>
parent 05d0bb6f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -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"