aboutsummaryrefslogtreecommitdiff
path: root/kiss
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-26 17:34:44 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-26 17:34:44 +0000
commit6aa2694569352dcc7c3908e3ec7d8c5050ca8fee (patch)
tree4dd62acc3f6d23789abc983e1e5c0e388a679b67 /kiss
parent650e2604c73ef06537460119b4614cfcef115430 (diff)
downloadcpt-6aa2694569352dcc7c3908e3ec7d8c5050ca8fee.tar.gz
kiss: Optimize directory installation.
FossilOrigin-Name: c1eac4c5d5a94d088ba6ff6242a7701eed3e31b701a817d7489260ded9ac07eb
Diffstat (limited to 'kiss')
-rwxr-xr-xkiss5
1 files changed, 3 insertions, 2 deletions
diff --git a/kiss b/kiss
index d47abbc..67731e9 100755
--- a/kiss
+++ b/kiss
@@ -192,7 +192,8 @@ pkg_install() {
cd "$tar_dir" || die "Aborting due to tar error."
- find ./ -mindepth 1 -type d | while read -r dir; do
+ # Optimization: Only find the deepest directories.
+ find . -type d -links -3 -prune | while read -r dir; do
mkdir -p "$sys_dir/${dir#./}"
done
@@ -258,7 +259,7 @@ pkg_list() {
}
args() {
- [ -w "$KISS_ROOT/" ] || case $1 in
+ [ -w "$sys_dir/" ] || case $1 in
i*|r*) die "No write permissions to \$KISS_ROOT."
esac