Not quite that either, since you lose the path to the tarball.
It would be better to change the directory of tar alone.
It is also a bad idea to let old kernels build up.
Here is version 0.3, also untested.
#!/bin/sh
#
# Run this script to properly unpack a new Linux kernel in /usr/src/.
# Give it the archive name as an argument. Note that it is much better
# to use patches, unless you get more than 15 versions behind.
#
mkdir -p /usr/src
rm -rf /usr/src/linux~
mv /usr/src/linux /usr/src/linux~
BN=`basename $1 .tar.bz2`
bunzip2 -cd $1 | (cd /usr/src/ && tar xf -)
cd /usr/src/
mv linux $BN
ln -s $BN linux
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu