summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2021-03-04 11:03:56 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2021-03-04 11:24:32 +0800
commit141f3e6a0bedd846cb12c6a89c5e203913241509 (patch)
tree9246d2a375fda5e651bae6f655320191c70f36a7
parent040689107d14bcb63ee968afed275912990412c2 (diff)
downloadandroid-build-kernel-versions-141f3e6a0bedd846cb12c6a89c5e203913241509.tar.gz
add get-update.sh script tool
-rwxr-xr-xget-update.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/get-update.sh b/get-update.sh
new file mode 100755
index 0000000..584fd67
--- /dev/null
+++ b/get-update.sh
@@ -0,0 +1,19 @@
+#!/bin/bash -ex
+
+kernel_branch=${1}
+kernel_version=${2}
+if [ -f "${kernel_branch}" ]; then
+ kernel_ver_old=$(cat "${kernel_branch}")
+ if [ "X${kernel_version}X" = "X${kernel_ver_old}X" ]; then
+ :
+ # do nothing when all the VERSION/PATCHLEVEL/SUBLEVEL are the same
+ else
+ echo "${kernel_version}" > "${kernel_branch}"
+ git add "${kernel_branch}"
+ git commit --no-edit -m "${kernel_branch}: update to ${kernel_version}"
+ git push origin HEAD:master
+ fi
+else
+ :
+ # no limit, trigger all builds for all the changes as normal
+fi