mirror of
https://github.com/rancher/os.git
synced 2025-07-01 01:01:48 +00:00
20 lines
394 B
Bash
20 lines
394 B
Bash
|
#!/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
|