aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-26 17:38:41 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-26 17:38:41 +0000
commit93eab21949a97f50613efe92416cdba962ab258d (patch)
tree6387f312c91aa17a8c48eb06009e11dd95956252
parent6aa2694569352dcc7c3908e3ec7d8c5050ca8fee (diff)
downloadcpt-93eab21949a97f50613efe92416cdba962ab258d.tar.gz
kiss: Remove tarball earlier.
FossilOrigin-Name: 4ff7d51e11517e3179228720f48276021f2716687a09a73ee261285de6f93d28
-rwxr-xr-xkiss5
1 files changed, 2 insertions, 3 deletions
diff --git a/kiss b/kiss
index 67731e9..7580078 100755
--- a/kiss
+++ b/kiss
@@ -178,6 +178,7 @@ pkg_install() {
[ -f "$bin_dir/$pkg" ] || args b "$name"
pkg_conflicts
+ tar pxf "$bin_dir/$pkg" -C "$tar_dir/" || die "Failed to extract tarball."
# Create a backup of 'mv', 'mkdir' and 'find' so they aren't removed
# during package removal.
@@ -188,8 +189,6 @@ pkg_install() {
log "Removing previous version of package if it exists."
pkg_remove
- tar pxf "$bin_dir/$pkg" -C "$tar_dir/"
-
cd "$tar_dir" || die "Aborting due to tar error."
# Optimization: Only find the deepest directories.
@@ -234,7 +233,7 @@ pkg_remove() {
# Use the backup of 'rm' to remove 'rmdir' and itself.
"$cac_dir/rm" "$cac_dir/rmdir" "$cac_dir/rm"
- log "Removed ${pkg%.tar.gz}"
+ log "Removed ${1:-name}."
}
pkg_updates() {