blob: cf07b4c6130fd09f2179c14bfe91882a3412dfcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
[ -s "$PORTAGE_TMPDIR" ] && exec -c /bin/bash -l -c $0
TMPDIR=/var/tmp/kernel
OUTDIR=$TMPDIR/build
export CCACHE_DIR=$TMPDIR/.ccache
export CCACHE_HARDLINK=true
if [ /usr/src/linux -nt /boot ] ; then
mkdir -p $OUTDIR $CCACHE_DIR
if [ ! -f $OUTDIR/.config -a -f /proc/config.gz ] ; then
zcat /proc/config.gz > $OUTDIR/.config
fi
genkernel --clean --kernel-outputdir=$OUTDIR all && \
grub-mkconfig -o /boot/grub/grub.cfg
qfile /lib/modules && emerge @module-rebuild
touch /boot
fi
|