cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit d217c065cd8ded87022105c681166d0b0a970ceb
parent ca9e19edebeee300f3163fda40aeb7744290464b
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Fri,  5 Jul 2019 20:07:11 +0300

pkg_install: Simplify find commands.

Diffstat:
Mkiss | 17++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/kiss b/kiss @@ -690,21 +690,12 @@ pkg_install() { # Create all of the package's directories. # Optimization: Only find the deepest directories. - "$cac_dir/find" . -type d -links -3 -prune | while read -r dir; do - "$cac_dir/mkdir" -p "$KISS_ROOT/${dir#./}" - done + "$cac_dir/find" . -type d -links -3 -prune \ + -exec "$cac_dir/mkdir" -p "$KISS_ROOT/"{} \; # Move all package files to '$KISS_ROOT'. - "$cac_dir/find" ./ -mindepth 1 -not -type d | while read -r file; do - rpath=${file#.} - - # Don't overwrite existing '/etc' files. - [ -z "${rpath##/etc/*}" ] && - [ -f "$KISS_ROOT/${rpath%/*}/${file##*/}" ] && - return - - "$cac_dir/mv" "$file" "$KISS_ROOT/${rpath%/*}" ||: - done + "$cac_dir/find" . -mindepth 1 -not -type d \ + -exec "$cac_dir/mv" -n {} "$KISS_ROOT/"{} \; # Reset 'trap' to its original value. Installation is done so # we no longer need to block 'Ctrl+C'.