diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-11-30 16:07:48 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-11-30 16:07:48 -0500 |
commit | d602c1d5d462100313a2c6c47434c652444ba7fd (patch) | |
tree | 667478e647baa695dff1cc61074799d4153dea55 /src/chroot-tools/librechroot | |
parent | aa8b0eee0187ca3e2ae1b8ecdad651f4846d4049 (diff) |
move librechroot's sync into it's own file for licensing reasons
Diffstat (limited to 'src/chroot-tools/librechroot')
-rwxr-xr-x | src/chroot-tools/librechroot | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot index d43ea2f..8e57004 100755 --- a/src/chroot-tools/librechroot +++ b/src/chroot-tools/librechroot @@ -22,34 +22,11 @@ . /etc/libretools.conf -## -# This function is almost verbatim from makechrootpkg -## -sync() { - if [[ $CHROOTCOPY = root ]]; then - error "Cannot sync the root copy with itself" - exit 1 - fi - - lock_open_read 8 "$rootdir" "Locking clean chroot" - - stat_busy 'Creating clean working copy' - local use_rsync=false - if type -P btrfs >/dev/null; then - [[ -d $copydir ]] && btrfs subvolume delete "$copydir" &>/dev/null - btrfs subvolume snapshot "$chrootdir/root" "$copydir" &>/dev/null || use_rsync=true - else - use_rsync=true - fi - - if $use_rsync; then - mkdir -p "$copydir" - rsync -a --delete -q -W -x "$CHROOTDIR/$CHROOT/root/" "$copydir" - fi - stat_done - - lock_close 8 -} +# This file (librechroot) is GPLv3+, but I would like to use some code +# modified from devtools' "makechrootpkg", which is GPLv2. +. "$(dirname "$0")/librechroot.gpl2" +# This gives us the functions: +# - sync cmd=${0##*/} usage() { |