Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
kiss: speed up rsync commands
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Sep 11, 2019
1 parent 847caa8 commit ee1d56c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kiss
Original file line number Diff line number Diff line change
Expand Up @@ -679,17 +679,17 @@ pkg_install() {

# This is repeated multiple times. Better to make it a function.
pkg_rsync() {
rsync --chown=root:root -HKav --exclude etc -- \
rsync --chown=root:root -WhHKa "$1" --no-compress --exclude etc -- \
"$tar_dir/$pkg_name/" "$KISS_ROOT/"
}

# Install the package by using 'rsync' and overwrite any existing files
# (excluding '/etc/').
pkg_rsync
pkg_rsync -v

# If '/etc/' exists in the package, install it but don't overwrite.
[ -d "$tar_dir/$pkg_name/etc" ] &&
rsync --chown=root:root -HKav --ignore-existing \
rsync --chown=root:root -WhHKa --no-compress --ignore-existing \
"$tar_dir/$pkg_name/etc" "$KISS_ROOT/"

# Remove any leftover files if this is an upgrade.
Expand Down

0 comments on commit ee1d56c

Please sign in to comment.