fixes
parent
389c34e7e4
commit
84fe77c2b2
10
tools/dir2sb
10
tools/dir2sb
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "$2" = "" ]; then
|
if [ "$2" = "" ]; then
|
||||||
echo "Usage: $0 [source_directory] [target_file.sb]"
|
echo "Usage: $0 [source_directory] [target_file.sb] [ -d ]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
@ -16,4 +16,10 @@ if [ -e "$2" ]; then
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
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
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
TMP=/tmp/changes$$
|
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
|
CHANGES=/mnt/live/memory/changes
|
||||||
|
|
||||||
if [ "$1" = "" ]; then
|
if [ "$1" = "" ]; then
|
||||||
|
|
@ -13,7 +13,7 @@ if [ ! "$2" = "" ]; then
|
||||||
CHANGES="$2"
|
CHANGES="$2"
|
||||||
fi
|
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/[.]/[.]/")""\$"
|
EXCLUDE="$EXCLUDE|^""$(readlink -f "$1" | cut -b 2- | sed -r "s/[.]/[.]/")""\$"
|
||||||
|
|
||||||
CWD=$(pwd)
|
CWD=$(pwd)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue