puke: cleanup

This commit is contained in:
Dylan Araps 2019-05-16 20:10:20 +03:00
parent d65df108a1
commit 5de17f36fa

9
puke
View File

@ -38,10 +38,9 @@ pkg_depends() {
pkg_sources() { pkg_sources() {
while read -r src; do while read -r src; do
case $(source_type "$src"; echo $?) in case $(source_type "$src"; echo $?) in
2|3) log "Found local ${src##*/}." ;;
4) git clone "${src##git:}" "$mak_dir" ;; 4) git clone "${src##git:}" "$mak_dir" ;;
5) wget -P "$src_dir" "$src" || die "Failed to download $src." ;; 5) wget -P "$src_dir" "$src" || die "Failed to download $src." ;;
*) die "Source file '$src' not found." ;; 0|1) die "Source file '$src' not found." ;;
esac esac
done < sources done < sources
} }
@ -62,8 +61,6 @@ pkg_checksum() {
pkg_verify() { pkg_verify() {
pkg_checksum /dev/stdout | diff checksums - || pkg_checksum /dev/stdout | diff checksums - ||
die "Checksum mismatch, run '$0 checksum $name' to update checksums." die "Checksum mismatch, run '$0 checksum $name' to update checksums."
log "Checksums verified."
} }
pkg_extract() { pkg_extract() {
@ -92,8 +89,8 @@ pkg_manifest() {
} }
pkg_tar() { pkg_tar() {
tar pcvf "$bin_dir/$pkg" -C "$pkg_dir" . || die "Failed to create package." tar pcf "$bin_dir/$pkg" -C "$pkg_dir" . || die "Failed to create package."
log "Package is at $bin_dir/$pkg." log "Use '$0 install $name' to install the package."
} }
pkg_install() { pkg_install() {