From 365c3f574a55116ced651828436dfdcd3b4c16a2 Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Thu, 11 Jul 2019 06:00:31 +0000 Subject: kiss: Fix directory permissions on install. FossilOrigin-Name: 180c518ef7ccac9003b8a43a7c2b65201a30f23b8846e41674a03e3686f336a2 --- kiss | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'kiss') 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 -- cgit v1.2.3