pull/40/head
TomasM 2017-11-02 16:57:46 -04:00
parent 389c34e7e4
commit 84fe77c2b2
2 changed files with 10 additions and 4 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
if [ "$2" = "" ]; then
echo "Usage: $0 [source_directory] [target_file.sb]"
echo "Usage: $0 [source_directory] [target_file.sb] [ -d ]"
exit 1
fi
@ -16,4 +16,10 @@ if [ -e "$2" ]; then
exit 3
fi
mksquashfs "$1" "$2" -comp xz -b 512K -keep-as-directory
if [ "$3" = "-d" ]; then
KEEP="-keep-as-directory"
else
KEEP=""
fi
mksquashfs "$1" "$2" -comp xz -b 512K $KEEP

View File

@ -1,7 +1,7 @@
#!/bin/bash
TMP=/tmp/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|^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|^root/.Xauthority|^root/.xsession-errors|^etc/mtab|^etc/fstab|^boot/|^dev/|^mnt/|^proc/|^run/|^sys/|^tmp/"
CHANGES=/mnt/live/memory/changes
if [ "$1" = "" ]; then
@ -13,7 +13,7 @@ if [ ! "$2" = "" ]; then
CHANGES="$2"
fi
# exclude the safe_file itself of course
# exclude the save_file itself of course
EXCLUDE="$EXCLUDE|^""$(readlink -f "$1" | cut -b 2- | sed -r "s/[.]/[.]/")""\$"
CWD=$(pwd)