Skip to content

Commit

Permalink
Merge pull request #76 from hkuno9000/exclude-option
Browse files Browse the repository at this point in the history
Feat: add exclude option
  • Loading branch information
billw2 authored Aug 26, 2019
2 parents 8b22bea + ed0732f commit 7ac4060
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rpi-clone
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ usage: $PGM sdN {-v|--verbose} {-f|--force-initialize} {-f2}
{-L|--label-partitions label} {-l|--leave-sd-usb-boot}
{-a|--all-sync} {-F|--Force-sync} {-x} {-V|--version}
{--convert-fstab-to-partuuid}
{--exclude=PATTERN} {--exclude-from=FILE}
-v - verbose rsync, list all files as they are copied.
-f - force initialize the destination disk by imaging the booted disk
Expand Down Expand Up @@ -290,6 +291,7 @@ rsync_file_system()
if [ "$3" == "with-root-excludes" ]
then
rsync $rsync_options --delete \
$exclude_useropt \
$exclude_swapfile \
--exclude '.gvfs' \
--exclude '/dev/*' \
Expand All @@ -303,6 +305,7 @@ rsync_file_system()
$dst_dir
else
rsync $rsync_options --delete \
$exclude_useropt \
--exclude '.gvfs' \
--exclude 'lost\+found/*' \
$src_dir \
Expand Down Expand Up @@ -783,6 +786,9 @@ do
quiet=1
rsync_options=${rsync_options}q
;;
--exclude=*|--exclude-from=*)
exclude_useropt="${exclude_useropt} $1"
;;
-s|--setup)
shift
if ! command -v $setup_command > /dev/null
Expand Down

0 comments on commit 7ac4060

Please sign in to comment.