script fixups
parent
3f92d8d653
commit
ed7524050d
|
|
@ -39,11 +39,23 @@ rm -Rf /usr/share/man/*_*
|
||||||
rm -f /root/.fehbg
|
rm -f /root/.fehbg
|
||||||
rm -f /root/.fluxbox/lastwallpaper
|
rm -f /root/.fluxbox/lastwallpaper
|
||||||
|
|
||||||
|
# Unzip gzipped files (man pages), so LZMA can compress 2times better.
|
||||||
|
# First we fix symlinks, then uncompress files
|
||||||
|
# $1 = search directory
|
||||||
|
uncompress_files()
|
||||||
|
{
|
||||||
|
local LINK LINE
|
||||||
|
|
||||||
# Unzip gzipped man pages, so LZMA can compress 2times better.
|
find "$1" -type l -name "*.gz" | while read LINE; do
|
||||||
# First we gunzip symlinks, which will be overwritten by the content of targets
|
LINK="$(readlink "$LINE" | sed -r 's/.gz$//')"
|
||||||
# this doesn't matter as mksquashfs will handle duplicate files correctly
|
FILE="$(echo "$LINE" | sed -r 's/.gz$//')"
|
||||||
find /usr/share/man -type l -name "*.gz" | xargs gunzip -f
|
ln -sfn "$LINK" "$FILE"
|
||||||
find /usr/share/man -name "*.gz" | xargs gunzip
|
rm -f "$LINE"
|
||||||
|
done
|
||||||
|
find "$1" -type f -name "*.gz" | xargs gunzip
|
||||||
|
}
|
||||||
|
|
||||||
|
uncompress_files /etc/alternatives
|
||||||
|
uncompress_files /usr/share/man
|
||||||
|
|
||||||
rm -Rf /usr/share/icons/elementaryXubuntu-dark
|
rm -Rf /usr/share/icons/elementaryXubuntu-dark
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,20 @@
|
||||||
#!/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|^root/.Xauthority|^root/.xsession-errors|^etc/mtab|^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|^root/[.]fehbg|^root/[.]fluxbox/lastwallpaper|^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
|
||||||
echo "Usage: $0 [ target_file.sb ] [ optional_changes_directory ]"
|
echo ""
|
||||||
|
echo "savechanges - save all changed files in a compressed filesystem bundle"
|
||||||
|
echo " - excluding some predefined files such as /etc/mtab,"
|
||||||
|
echo " temp & log files, empty directories, apt cache, and such"
|
||||||
|
echo ""
|
||||||
|
echo "Usage:"
|
||||||
|
echo " $0 [ target_file.sb ] [ changes_directory ]"
|
||||||
|
echo ""
|
||||||
|
echo "If changes_directory is not specified, /mnt/live/memory/changes is used."
|
||||||
|
echo ""
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue