This commit is contained in:
TomasM
2017-10-14 05:50:50 -04:00
parent d8da52eff4
commit e1b57bb02d
3 changed files with 6 additions and 4 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
TMP=/tmp/changes$$
CHANGES=/mnt/live/memory/changes
EXCLUDE="^\$|/\$|[.]wh[.][.]wh[.]orph/|^[.]wh[.][.]wh[.]plnk/|^[.]wh[.][.]wh[.]aufs|^var/cache/|^var/backups/|^var/tmp/|^var/log/|^var/lib/apt/|^var/lib/dhcp/|^var/lib/systemd/|^sbin/fsck[.]aufs|^etc/resolv[.]conf|^etc/fstab|^etc/ld[.]so[.]cache|^boot/|^dev/|^mnt/|^proc/|^run/|^sys/|^tmp/"
EXCLUDE="^\$|/\$|[.]wh[.][.]wh[.]orph/|^[.]wh[.][.]wh[.]plnk/|^[.]wh[.][.]wh[.]aufs|^var/cache/|^var/backups/|^var/tmp/|^var/log/|^var/lib/apt/|^var/lib/dhcp/|^var/lib/systemd/|^sbin/fsck[.]aufs|^etc/resolv[.]conf|^etc/fstab|^boot/|^dev/|^mnt/|^proc/|^run/|^sys/|^tmp/"
if [ "$1" = "" ]; then
echo "Usage: $0 [ target_file.sb ]"
@@ -22,7 +22,7 @@ mount -t tmpfs tmpfs $TMP
find \( -type d -printf "%p/\n" , -not -type d -print \) \
| sed -r "s/^[.]\\///" | egrep -v "$EXCLUDE" \
| while read FILE; do
cp -v --parents -afr "$FILE" "$TMP"
cp --parents -afr "$FILE" "$TMP"
done
cd $CWD