From 050dbff624056d44148d1cc916ea4965bd01ee52 Mon Sep 17 00:00:00 2001 From: "dylan.araps@gmail.com" Date: Sun, 21 Jul 2019 08:35:24 +0000 Subject: pkg_install: Use rsync FossilOrigin-Name: 1731de0d6b09bc1f13d3031d74a30712927d2e295e5a52fcc29b0d4d09108eda --- kiss | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'kiss') diff --git a/kiss b/kiss index b5794f6..6229775 100755 --- a/kiss +++ b/kiss @@ -707,15 +707,13 @@ pkg_install() { [ -f "$KISS_ROOT/$pkg_db/$pkg_name/manifest" ] && cp -f "$KISS_ROOT/$pkg_db/$pkg_name/manifest" "$cac_dir/m-$pkg_name" - # Install the package by using 'tar' and overwrite any existing files - # (ignoring files in '/etc'). - (cd "$tar_dir"; tar cpf - --exclude ./etc/\* . | - tar -C "$KISS_ROOT/" -vxpf -) + # Install the package by using 'rsync' and overwrite any existing files + # (excluding '/etc/'). + rsync -Kav --exclude etc -- "$tar_dir/" "$KISS_ROOT/" - # Install all '/etc' files however don't overwrite any which already - # exist. - (cd "$tar_dir"; tar cpf - ./etc | - tar -C "$KISS_ROOT/" -kvxpf -) 2>/dev/null + # If '/etc/' exists in the package, install it but don't overwrite. + [ -d "$tar_dir/etc" ] && + rsync -Kav --ignore-existing "$tar_dir/etc" "$KISS_ROOT/" # Remove any leftover files if this is an upgrade. [ -f "$cac_dir/m-$pkg_name" ] @@ -949,7 +947,7 @@ args() { # Print version and exit. v*) - log "$kiss 0.4.2" + log "$kiss 0.5.0" ;; # Catch all invalid arguments as well as -- cgit v1.2.3