chiark / gitweb /
get-kernel: Only move 'linux' out of the way if it exists as a symbolic
authorColin Watson <cjwatson@chiark.greenend.org.uk>
Thu, 7 Nov 2002 15:58:38 +0000 (15:58 +0000)
committerColin Watson <cjwatson@chiark.greenend.org.uk>
Thu, 7 Nov 2002 15:58:38 +0000 (15:58 +0000)
link.

get-kernel

index bd9b916..a936122 100755 (executable)
@@ -11,5 +11,5 @@ MAJOR="${1%.*}"
 rm -f linux
 wget -c "ftp://ftp.kernel.org/pub/linux/kernel/v$MAJOR/linux-$VERSION.tar.bz2"
 tar xjvf "linux-$VERSION.tar.bz2"
 rm -f linux
 wget -c "ftp://ftp.kernel.org/pub/linux/kernel/v$MAJOR/linux-$VERSION.tar.bz2"
 tar xjvf "linux-$VERSION.tar.bz2"
-mv linux "linux-$VERSION"
+if [ -h linux ]; then mv linux "linux-$VERSION"; fi
 ln -s "linux-$VERSION" linux
 ln -s "linux-$VERSION" linux