blob: da9ee370913ca6189fa3c4850fbc143ae221da45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/bin/bash
# A simple script for managing a vimwiki git repo.
# Allows slightly simpler edits and commits.
if [ $# -eq 0 ] || [ $1 = "edit" ]; then
vim +VimwikiIndex
exit
fi
pushd ~/vimwiki/
case $1 in
commit)
shift
if [ $# -eq 0 ]; then
msg="$(date --rfc-email)"
else
msg="$@"
fi
git add -A
git commit -m "$msg"
;;
ammend)
shift
if [ $# -eq 0 ]; then
git commit --amend
else
msg="$@"
git commit --amend -m "$msg"
fi
;;
g|go)
wiki commit
wiki push
;;
*)
eval "git $@"
;;
esac
|