summaryrefslogtreecommitdiff
path: root/get-upstream
diff options
context:
space:
mode:
Diffstat (limited to 'get-upstream')
-rwxr-xr-xget-upstream26
1 files changed, 26 insertions, 0 deletions
diff --git a/get-upstream b/get-upstream
new file mode 100755
index 0000000..54e2938
--- /dev/null
+++ b/get-upstream
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+set -e
+
+tmp=$(mktemp)
+cleanup(){
+ rm -f $tmp
+ rm -rf notmyidea
+}
+trap "cleanup" 1 2 3 13 15
+
+svn checkout https://github.com/getpelican/pelican/trunk/pelican/themes/notmyidea \
+ | tee $tmp
+
+revision=$(grep "^Checked out revision" $tmp | sed -e 's/.* \([0-9]\+\).*/\1/')
+echo $revision
+
+git switch upstream || git checkout -b upstream
+cp -a notmyidea/* .
+git add static templates
+if [ -n "$(git diff --cached)" ] ; then
+ git commit -m "Update for new upstream version (revision $revision)"
+fi
+git switch main
+
+cleanup