From 9bd05731a03a873c274111ea4b23d069d557f50d Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Mon, 13 May 2019 10:48:58 +0300 Subject: [PATCH] puke: use subshell --- puke | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/puke b/puke index ba1f7f30..53dfe168 100755 --- a/puke +++ b/puke @@ -82,8 +82,8 @@ pkg_verify() { pkg_checksum .checksums diff .checksums checksums || - die "checksum of sources does not match checksum of package" \ - "run '$0 checksum $name' to update checksums" + die "Checksums of sources do not match checksums of package." \ + "Run '$0 checksum $name' to update checksums" log "Checksums verified." rm .checksums @@ -95,7 +95,7 @@ pkg_extract() { case $? in 2) cp -f "$src" "$mak_dir" ;; - 4) continue ;; + 4) ;; 3) case $src in *.tar|*.tar.??|*.tar.???|*.tar.????|*.tgz) @@ -122,7 +122,7 @@ pkg_build() { log "Sucessfully built $pkg." } -pkg_manifest() { +pkg_manifest() ( cd "$pkg_dir" _() { find . -mindepth 1 "$@" | sed 's/^\.//'; } @@ -130,8 +130,7 @@ pkg_manifest() { _ -type d | sort -r >> "$OLDPWD/manifest" cp "$OLDPWD/manifest" "$pkg_dir/$dbs_dir/$name" - cd - >/dev/null -} +) pkg_tar() { cd "$bin_dir"