a) It's not a big deal anyway, and
b) Linux users are (generally) not dummies, and can do this kind
of thing themselves.
#! /bin/sh
# ksrc_gzip v1.0 by Adam McKee <Adam.McKee@usask.ca>
#
# This is a quick-and-dirty shell script to save some disk space by compressing
# the kernel sources. The directories/files needed for development are left
# intact. This script takes no arguments -- it knows what you want it to do
# based on whether or not the kernel sources are compressed.
#
# ASSUMPTIONS:
#
# - /usr/src/linux -> /usr/src/linux-${VERSION}
# i.e. /usr/src/linux -> /usr/src/linux-2.0.0
#
# - /usr/src/linux/include/asm -> /usr/src/linux/include/asm-${ARCH}
# i.e. /usr/src/linux/include/asm -> /usr/src/linux/include/asm-i386
#
# - The script is run with uid=euid=root, gid=egid=root.
#
# If any of these assumptions are invalid, make them valid before running the
# script :)
V=`ls -l /usr/src/linux` ; V=${V#* -> *-}
SRC=/usr/src/linux-${V}
TMP=${SRC}.$
ZIP=${SRC}.tar.gz
umask 022
if [ -f $ZIP ]; then
pushd / > /dev/null
rm -rf $SRC
tar xzf $ZIP
rm -f $ZIP
popd > /dev/null
else
tar czf $ZIP $SRC
mv $SRC $TMP
mkdir $SRC
mkdir ${SRC}/include
cp -Rp ${TMP}/include/asm ${SRC}/include
cp -Rdp ${TMP}/include/linux ${SRC}/include
rm -rf $TMP
fi