aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-07-11 06:00:31 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-07-11 06:00:31 +0000
commit365c3f574a55116ced651828436dfdcd3b4c16a2 (patch)
treea39bb1b6dfd9a771ef22645c1b7b84017dcce0a1 /kiss
parent3c1ee21e8e6abbeea6ddfd6daae2ffcf305a059c (diff)
downloadcpt-365c3f574a55116ced651828436dfdcd3b4c16a2.tar.gz
kiss: Fix directory permissions on install.
FossilOrigin-Name: 180c518ef7ccac9003b8a43a7c2b65201a30f23b8846e41674a03e3686f336a2
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss12
1 files changed, 5 insertions, 7 deletions
diff --git a/kiss b/kiss
index 17be598..5cc8646 100755
--- a/kiss
+++ b/kiss
@@ -667,11 +667,11 @@ pkg_install() {
die "[$1]: Package requires ${required_install%, }." \
"[$1]: Aborting here..."
- # Create a backup of 'mv', 'mkdir' and 'find' so they aren't removed
+ # Create a backup of 'mv', 'cpio' and 'find' so they aren't removed
# during package removal. This ensures that an upgrade to 'busybox' or
# your core utilities of choice doesn't break the package manager.
cp "$(command -v mv)" "$cac_dir"
- cp "$(command -v mkdir)" "$cac_dir"
+ cp "$(command -v cpio)" "$cac_dir"
cp "$(command -v find)" "$cac_dir"
log "[$pkg_name]: Removing previous version of package if it exists."
@@ -689,9 +689,7 @@ pkg_install() {
cd "$tar_dir"
# Create all of the package's directories.
- # Optimization: Only find the deepest directories.
- "$cac_dir/find" . -type d -links -3 -prune \
- -exec "$cac_dir/mkdir" -p "$KISS_ROOT/"{} \;
+ "$cac_dir/find" . -type d | "$cac_dir/cpio" -mp "$KISS_ROOT/"
# Move all package files to '$KISS_ROOT'.
"$cac_dir/find" . -mindepth 1 -not -type d \
@@ -791,7 +789,7 @@ pkg_clean() {
rm -rf -- "$mak_dir" "$pkg_dir" "$tar_dir"
# Remove cached commands.
- rm -f -- "$cac_dir/find" "$cac_dir/mv" "$cac_dir/mkdir" \
+ rm -f -- "$cac_dir/find" "$cac_dir/mv" "$cac_dir/cpio" \
"$cac_dir/rm" "$cac_dir/rmdir"
# Remove temporary files.
@@ -865,7 +863,7 @@ args() {
# Print version and exit.
v*)
- log "$kiss 0.2.3"
+ log "$kiss 0.2.4"
;;
# Catch all invalid arguments as well as