add doit.sh backports
authorJohn Crispin <john@phrozen.org>
Thu, 6 Sep 2018 16:57:47 +0000 (18:57 +0200)
committerJohn Crispin <john@phrozen.org>
Thu, 6 Sep 2018 16:57:47 +0000 (18:57 +0200)
Signed-off-by: John Crispin <john@phrozen.org>
doit.sh [new file with mode: 0755]

diff --git a/doit.sh b/doit.sh
new file mode 100755 (executable)
index 0000000..1705e56
--- /dev/null
+++ b/doit.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+TOPDIR=${PWD}
+LINUX="v4.18.5"
+REFERENCE="--reference /src/linux/stable.git/.git"
+
+[ -d ${TOPDIR}/linux-stable.git ]  || {
+       git clone ${REFERENCE} git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git ${TOPDIR}/linux-stable.git
+       [ $? = 0 ] || {
+               echo failed to clone linux-stable
+               exit 1
+       }
+}
+
+[ -d ${TOPDIR}/backports.git ] || {
+       git clone https://git.openwrt.org/openwrt/staging/blogic.git ${TOPDIR}/backports.git
+       [ $? = 0 ] || {
+               echo failed to clone backports
+               exit 1
+       }
+}
+
+cd ${TOPDIR}/backports.git
+git checkout backports
+
+mkdir -p ${TOPDIR}/backports-${LINUX}
+./gentree.py --refresh  --clean --verbose --git-revision ${LINUX} ${TOPDIR}/linux-stable.git ${TOPDIR}/backports-${LINUX}
+[ $? = 0 ] || {
+       echo failed to gentree
+       exit 1
+}
+
+cd ${TOPDIR}
+rm -rf backports-${LINUX}.tar.xz
+tar cfJ backports-${LINUX}.tar.xz backports-${LINUX}
+
+