script fixups
This commit is contained in:
+17
-5
@@ -39,11 +39,23 @@ rm -Rf /usr/share/man/*_*
|
||||
rm -f /root/.fehbg
|
||||
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.
|
||||
# First we gunzip symlinks, which will be overwritten by the content of targets
|
||||
# this doesn't matter as mksquashfs will handle duplicate files correctly
|
||||
find /usr/share/man -type l -name "*.gz" | xargs gunzip -f
|
||||
find /usr/share/man -name "*.gz" | xargs gunzip
|
||||
find "$1" -type l -name "*.gz" | while read LINE; do
|
||||
LINK="$(readlink "$LINE" | sed -r 's/.gz$//')"
|
||||
FILE="$(echo "$LINE" | sed -r 's/.gz$//')"
|
||||
ln -sfn "$LINK" "$FILE"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user