aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-26 08:37:22 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-08-26 08:37:22 +0000
commit506af445aa756f05e0b6b300993bf093df1c9286 (patch)
treeff9a57bf2afcbcca4dd7c317f4705dfe71e8a97f
parentf7269c2c8332d33285fb8e6648c2fef8a3042950 (diff)
downloadcpt-506af445aa756f05e0b6b300993bf093df1c9286.tar.gz
kiss: Remove temporary file
FossilOrigin-Name: b1d63aa2b6c0378a28705d7ee514073eaa108b0cc3f56f5304d3134260c85f0f
-rwxr-xr-xkiss11
1 files changed, 3 insertions, 8 deletions
diff --git a/kiss b/kiss
index d65ab78..d5d9b99 100755
--- a/kiss
+++ b/kiss
@@ -184,7 +184,7 @@ pkg_extract() {
|| die "[$1] Couldn't extract ${src##*/}"
;;
- # Local files (Any source that is non-remote is assumed to be local).
+ # Local files (Any non-remote source is assumed to be local).
*)
if [ -f "$repo_dir/$src" ]; then
cp -f "$repo_dir/$src" "./$dest"
@@ -232,14 +232,9 @@ pkg_verify() {
# a new set of checksums and then comparing those with the old
# set.
- repo_dir=$(pkg_find "$1")
-
# Generate a second set of checksums to compare against the
# repository's checksums for the package.
- pkg_checksums "$1" > "$cac_dir/c-$1"
-
- # Compare the checksums using 'cmp'.
- cmp -s "$cac_dir/c-$1" "$repo_dir/checksums" || {
+ pkg_checksums "$1" | cmp -s - "$(pkg_find "$1")/checksums" || {
log "[$1] Checksum mismatch"
# Instead of dying above, log it to the terminal. Also define a
@@ -918,7 +913,7 @@ pkg_clean() {
rm -rf -- "$mak_dir" "$pkg_dir" "$tar_dir"
# Remove temporary files.
- set +f; rm -f "$cac_dir/c-"* "$cac_dir/m-"*
+ set +f; rm -f "$cac_dir/m-"*
}
args() {