Add verify function

Use original filename when downloading debian package
main
earnest ma 2021-07-27 16:26:07 -04:00
parent 8f0fb28cf7
commit 9a5a45a637
No known key found for this signature in database
GPG Key ID: 6B361FA81C5FB695
1 changed files with 16 additions and 2 deletions

18
aptpkg
View File

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