diff --git a/aptpkg b/aptpkg index 1cef6a7..217c75d 100755 --- a/aptpkg +++ b/aptpkg @@ -27,6 +27,11 @@ error_usage_die(){ exit 1 } +# Verify sha512sums +verify(){ + echo "$sha512sums" | sha512sum -c +} + # Copy/ install wrapper for files cin-bin(){ install -Dm755 "$@" @@ -59,7 +64,9 @@ $customcontrol # Download a debian package build_deb(){ echo "Getting $source" - wget "$source" -qO dist/"$name"_"$version"-"$rev"_amd64.deb + wget "$source" -qP dist/ + + ( cd dist ; verify ) } # Download and build using files @@ -69,7 +76,14 @@ build_file(){ cd "$1" mkdir -p "$builddir" - download "$@" + for url in $source; do + echo "Getting $source" + wget -q "$url" + done + + verify + + # Run steps "$@" gen_control_file "$@"