Re: Why from there? A rethink...

Albert D. Cahalan (acahalan@cs.uml.edu)
Fri, 15 May 1998 01:00:48 -0400 (EDT)


Riley Williams writes:
>>> I therefore repeat my plea: PLEASE PLEASE PLEASE use the FULL version
>>> numbered base directory name in the full source tarballs. It would
>>> also be appreciated if you could include the relevant symlink from
>>> ./linux to ./linux-?.?.? to update that as well, but that isn't so
>>> important...
>
>> First draft (not tested) of a solution:
>
> NOT good - amend it as shown and it should be OK though...

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