2016-11-14 05:37:18 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2016-11-14 10:10:09 +00:00
|
|
|
set -x
|
2016-11-14 05:37:18 +00:00
|
|
|
|
2016-11-14 10:10:09 +00:00
|
|
|
echo "Kernel headers for ${KERNEL_VERSION}"
|
2016-11-14 05:37:18 +00:00
|
|
|
|
2016-11-14 10:10:09 +00:00
|
|
|
DIR=/lib/modules/${KERNEL_VERSION}/build
|
|
|
|
STAMP=/lib/modules/${KERNEL_VERSION}/.headers-done
|
2016-11-14 05:37:18 +00:00
|
|
|
|
|
|
|
if [ -e $STAMP ]; then
|
2016-11-14 10:10:09 +00:00
|
|
|
echo Kernel headers for ${KERNEL_VERSION} already installed. Delete $STAMP to reinstall
|
2016-11-14 05:37:18 +00:00
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2016-11-14 10:10:09 +00:00
|
|
|
rm -rf $DIR
|
2016-11-14 05:37:18 +00:00
|
|
|
mkdir -p $DIR
|
2016-11-14 10:10:09 +00:00
|
|
|
|
2016-11-24 05:47:29 +00:00
|
|
|
cat /build.tar.gz | gzip -dc | tar xf - -C $DIR
|
2016-11-14 05:37:18 +00:00
|
|
|
touch $STAMP
|
|
|
|
|
2016-11-14 10:10:09 +00:00
|
|
|
echo Kernel headers for ${KERNEL_VERSION} installed. Delete $STAMP to reinstall
|