#!/bin/bash DIR=/tmp/kernel if [ -f include/generated/utsrelease.h ]; then FILE=include/generated/utsrelease.h; else FILE=include/linux/utsrelease.h; fi version=$(grep UTS_RELEASE $FILE | cut -f 2 -d '"'); if [ -z "$version" ]; then echo "couldn't get version" >&2; exit 1; fi echo "version is $version" >&2 rm -Rf $DIR make $(cat vars) modules_install INSTALL_MOD_PATH=$DIR/ >/dev/null; mkdir $DIR/boot cp .config $DIR/boot/config-$version; cp System.map $DIR/boot/System.map-$version; cp arch/x86/boot/bzImage $DIR/boot/vmlinuz-$version; cd $DIR tar cfj /tmp/$version.tar.bz2 * cd ..; echo $version.tar.bz2; scp /tmp/$version.tar.bz2 cem@lobo.ruivo.org:./public_html/kernel/