1
0
mirror of https://github.com/rancher/os.git synced 2025-09-17 23:48:09 +00:00

Refactor build scripts

This commit is contained in:
Darren Shepherd
2016-05-06 10:12:09 -07:00
parent acc2ee297a
commit ec410addb9
103 changed files with 1310 additions and 632 deletions

19
images/02-headers/headers.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
set -e
DIR=$(readlink /lib/modules/$(uname -r)/build)
STAMP=${DIR}/.done
VER=$(basename $DIR)
URL=https://github.com/rancher/os-kernel/releases/download/${VER}/build.tar.gz
if [ -e $STAMP ]; then
echo Headers already installed in $DIR
exit 0
fi
echo Downloading $URL
mkdir -p $DIR
wget -O - $URL | gzip -dc | tar xf - -C $DIR
touch $STAMP
echo Headers installed at $DIR