summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-10-08 15:20:19 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-10-08 15:20:19 +0000
commit23919e56b6fd937cf4c507726f92db315cd034cd (patch)
tree9de4e099a06b5d6c285a2a7bb7e542dd70deb5c6 /kernel
parent9097ec20fc7c6fe3af8b0abefc0c6ec1384b643a (diff)
downloaddrakx-23919e56b6fd937cf4c507726f92db315cd034cd.tar
drakx-23919e56b6fd937cf4c507726f92db315cd034cd.tar.gz
drakx-23919e56b6fd937cf4c507726f92db315cd034cd.tar.bz2
drakx-23919e56b6fd937cf4c507726f92db315cd034cd.tar.xz
drakx-23919e56b6fd937cf4c507726f92db315cd034cd.zip
allow specifying a kernel
Diffstat (limited to 'kernel')
-rwxr-xr-xkernel/update_kernel11
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel
index ddb7483dc..26f2734fb 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -56,7 +56,14 @@ function create_modules_mar() {
if [ "$ARCH" == "ia64" ] || [ "$ARCH" == "ppc" ]; then
rpm=$(rpm -qp --qf '%{name}' $RPMS/kernel-[0-9]*.rpm | perl -pe 's/kernel-((\.?[0-9]+){3})\.(.*)/$1-${3}/')
else
- rpm=$(rpm -qp --qf '%{name}' $RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-((\.?[0-9]+){3})\.(.*)/$1-${3}BOOT/')
+ #- allow specifying a kernel file on commandline (./update_kernel /RPMS/kernel-2.4.22.10mdk-1-1mdk.i586.rpm 2.4.22-10mdk)
+ if [ -n "$1" ]; then
+ file=$1
+ rpm=$2
+ else
+ file=$RPMS/kernel-BOOT-*.rpm
+ rpm=$(rpm -qp --qf '%{name}' $file | perl -pe 's/kernel-BOOT-((\.?[0-9]+){3})\.(.*)/$1-${3}BOOT/')
+ fi
fi
if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then
[ -n "$main" ] && rm -rf $ALL_KERNELS/$main
@@ -66,7 +73,7 @@ if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then
if [ "$ARCH" == "ia64" ] || [ "$ARCH" == "ppc" ]; then
rpm2cpio $RPMS/kernel-[0-9]*.rpm | cpio -id
else
- rpm2cpio $RPMS/kernel-BOOT-*.rpm | cpio -id
+ rpm2cpio $file | cpio -id
fi
find -type f -name "*.o.gz" | xargs gunzip
cd ../..