diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-21 08:35:24 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2019-07-21 08:35:24 +0000 |
commit | 050dbff624056d44148d1cc916ea4965bd01ee52 (patch) | |
tree | 545bce10afe9d1a6dd8e8cc1dc371b0f9e932ffe /kiss | |
parent | 22b94d2d8b3d575c80125348fb1d8eb08eb5a8d0 (diff) | |
download | cpt-050dbff624056d44148d1cc916ea4965bd01ee52.tar.gz |
pkg_install: Use rsync
FossilOrigin-Name: 1731de0d6b09bc1f13d3031d74a30712927d2e295e5a52fcc29b0d4d09108eda
Diffstat (limited to 'kiss')
-rwxr-xr-x | kiss | 16 |
1 files changed, 7 insertions, 9 deletions
@@ -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 |