diff options
-rwxr-xr-x | kernel/update_kernel | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel index 9cea09e7d..5d815783d 100755 --- a/kernel/update_kernel +++ b/kernel/update_kernel @@ -4,8 +4,13 @@ ALL_KERNELS="all.kernels" # move stuff to this new "kernel" directory if [ ! -d all.kernels ]; then - mv ../all.kernels . - rm -rf ../all.modules + if [ -d ../all.kernels ]; then + mv ../all.kernels . + rm -rf ../all.modules + else + # make sure "all.kernels" directory exists + mkdir all.kernels + fi fi function create_marfile() { @@ -38,7 +43,7 @@ function create_modules() { [ -e $ALL_KERNELS/.main ] && main=$(cat $ALL_KERNELS/.main) -rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-(.*)\.(.*)/$1-${2}BOOT/') +rpm=$(rpm -qp --qf '%{name}' /RPMS/kernel-BOOT-*.rpm | perl -pe 's/kernel-BOOT-((\.?[0-9]+){3})\.(.*)/$1-${3}BOOT/') if [ -n "$rpm" -a ! -e $ALL_KERNELS/$rpm ]; then [ -n "$main" ] && rm -rf $ALL_KERNELS/$main cd $ALL_KERNELS @@ -91,6 +96,7 @@ for i in $ALL_KERNELS/*; do create_modules ../../$i $kern else echo "$kern ($main)" + find ../../$i -type f -name "*.o.gz" | xargs gunzip create_modules ../../$i $kern 2>/dev/null fi ) || exit 1 |