summaryrefslogtreecommitdiff
path: root/pkg/linux-headers/fetch.sh
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-02-13 14:07:20 -0800
committerMichael Forney <mforney@mforney.org>2020-02-20 18:00:47 -0800
commitfac05879fd7b857d61ce5d34d45fe930fe0192a3 (patch)
tree11553b43ec426cb973b77348ad2b4254a75eee78 /pkg/linux-headers/fetch.sh
parent15df2417a80027ffe500d8ca6a4fc1ff1d26bca4 (diff)
Add linux-headers 5.5.3
Diffstat (limited to 'pkg/linux-headers/fetch.sh')
-rw-r--r--pkg/linux-headers/fetch.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkg/linux-headers/fetch.sh b/pkg/linux-headers/fetch.sh
new file mode 100644
index 00000000..316e4382
--- /dev/null
+++ b/pkg/linux-headers/fetch.sh
@@ -0,0 +1,24 @@
+set -e
+
+dir=$1
+shift
+
+cd "$dir"
+
+if [ -e src ] ; then
+ rm -rf src
+fi
+
+if ! sha256sum -c sha256 2>/dev/null ; then
+ curl -L -K url -O
+ sha256sum -c sha256
+fi
+
+read -r _ archive <sha256
+
+xzcat "$archive" | ${PAXREAD:-pax -r} -s ',^[^/]*,src,' \
+ 'linux-*/Makefile' \
+ 'linux-*/arch/*/include/uapi' \
+ 'linux-*/arch/*/syscalls' \
+ 'linux-*/include/uapi' \
+ 'linux-*/scripts/unifdef.c'