aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/misc/sync-gist.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/misc/sync-gist.sh')
-rwxr-xr-xtools/misc/sync-gist.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/misc/sync-gist.sh b/tools/misc/sync-gist.sh
new file mode 100755
index 0000000..54fa4fe
--- /dev/null
+++ b/tools/misc/sync-gist.sh
@@ -0,0 +1,18 @@
1#! /bin/bash
2
3set -o pipefail
4set -e
5
6repo=~/gist/b0d2e7e67aa50298fdf8111ae7466b56
7
8while read -r commit; do
9
10 cd $repo
11 git checkout $commit
12 message="$(git show $commit | sed -n '1,4 d; /^diff/ q; s/^ //p')"
13
14 cd ~/git/Bash-Snippets
15 cp $repo/gist gist/gist
16 git add gist/gist && git commit -m "$message"
17done
18