aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2013-10-02 11:40:37 -0600
committerStephen Warren <swarren@nvidia.com>2013-10-02 11:40:37 -0600
commit6fff4e66d56a51e939f4a4ab785655d9fd571163 (patch)
tree26493a72326ef882509e335a74d492146868aa99
downloadmaint-scripts-6fff4e66d56a51e939f4a4ab785655d9fd571163.tar.gz
Some scripts I use to maintain linux-tegra.git
-rwxr-xr-xmerge-linux-tegra.sh15
-rwxr-xr-xojn-git-pull-script.sh57
-rwxr-xr-xpush-linux-tegra.sh10
-rw-r--r--tegra-branches.sh.dot7
4 files changed, 89 insertions, 0 deletions
diff --git a/merge-linux-tegra.sh b/merge-linux-tegra.sh
new file mode 100755
index 0000000..c5889a4
--- /dev/null
+++ b/merge-linux-tegra.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+set -x
+
+. `dirname $0`/tegra-branches.sh.dot
+
+if [ "$1" != "--no-reset" ]; then
+ git checkout for-next
+ git reset --hard v3.12-rc1
+fi
+
+for b in ${branches}; do
+ git merge -m "Merge branch ${b} into for-next" --no-ff ${b}
+done
diff --git a/ojn-git-pull-script.sh b/ojn-git-pull-script.sh
new file mode 100755
index 0000000..a4ebe1c
--- /dev/null
+++ b/ojn-git-pull-script.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+BASE=$1
+TIP=$2
+
+case "${TIP}" in
+tegra*)
+ REPO=tegra
+ ;;
+bcm2835*)
+ REPO=rpi
+ ;;
+*)
+ echo Cannot determine which repo to pull from
+ exit 1
+ ;;
+esac
+
+BASE_SHA=$(git log --pretty=oneline -1 ${BASE} | cut -d' ' -f 1)
+BASE_DESC=$(git log --pretty=oneline -1 ${BASE} | cut -d' ' -f 1 --complement)
+
+TIP_SHA=$(git log --pretty=oneline -1 ${TIP} | cut -d' ' -f 1)
+TIP_DESC=$(git log --pretty=oneline -1 ${TIP} | cut -d' ' -f 1 --complement)
+
+TAG_SUBJ=$(git show ${TIP} | awk 'BEGIN {flag=0} /^$/ {flag=1; next} (flag==1) {print;exit}')
+
+echo -n "From foo "; date
+echo -n "From: "; git config --get sendemail.from
+echo "Subject: [GIT PULL] ${TAG_SUBJ}"
+echo -n "Date: "; date -R
+echo "X-NVConfidentiality: public"
+
+# The following prints the blank line required to delineate headers/body
+git show ${TIP} | awk 'BEGIN {flag=0} /^$/ {flag++} /-----BEGIN PGP/ {exit} (flag>1) {print}'
+
+echo
+echo "----------------------------------------------------------------"
+echo
+
+echo "The following changes since commit $BASE_SHA:"
+echo
+echo " $BASE_DESC"
+echo
+echo "are available in the git repository at:"
+echo
+echo " git://git.kernel.org/pub/scm/linux/kernel/git/swarren/linux-${REPO}.git $TIP"
+echo
+
+echo "for you to fetch changes up to $TIP_SHA:"
+echo
+echo " $TIP_DESC"
+echo
+echo "----------------------------------------------------------------"
+echo
+
+git shortlog $BASE_SHA..$TIP_SHA | cat
+git diff -M --stat=75 --summary $BASE_SHA..$TIP_SHA | cat
diff --git a/push-linux-tegra.sh b/push-linux-tegra.sh
new file mode 100755
index 0000000..18c8fb6
--- /dev/null
+++ b/push-linux-tegra.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+set -x
+
+. `dirname $0`/tegra-branches.sh.dot
+
+for b in ${branches} for-next; do
+ git push --force korg_swarren_linux-tegra ${b}:${b}
+done
diff --git a/tegra-branches.sh.dot b/tegra-branches.sh.dot
new file mode 100644
index 0000000..c124f80
--- /dev/null
+++ b/tegra-branches.sh.dot
@@ -0,0 +1,7 @@
+branches=""
+branches="${branches} for-3.13/deps-for-arm-init-time-cleanup" # On v3.12-rc1
+branches="${branches} for-3.13/cleanup" # On for-3.13/deps-for-arm-init-time-cleanup
+branches="${branches} for-3.13/soc" # On for-3.13/cleanup
+branches="${branches} for-3.13/dt" # On v3.12-rc1
+branches="${branches} for-3.13/defconfig" # On v3.12-rc1
+branches="${branches} for-3.13/maintainers" # On v3.12-rc1