diff options
author | Rafael Laboissière <rafael@laboissiere.net> | 2022-12-11 09:55:05 +0100 |
---|---|---|
committer | Rafael Laboissière <rafael@laboissiere.net> | 2022-12-11 09:55:05 +0100 |
commit | 620ce27818a754dc9604d5a9344fa493cdf1241b (patch) | |
tree | b4898b48192bc7518ea088f3c1f1c76fc65bbc2e |
Initial commit
-rwxr-xr-x | get-upstream | 26 |
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 |