diff options
author | Peter Palfrader <peter@palfrader.org> | 2016-04-07 12:29:08 +0200 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2016-04-07 12:29:08 +0200 |
commit | 0930595d0008cbcd5a634c3c6fb90cb6594b469a (patch) | |
tree | 635bfefcbe078e508071eec5902cf35b96f1f4a4 /zshfunc | |
parent | 23ae56145f4859eb7298cb7530686717c030c03f (diff) |
apply local patch to bibs
Diffstat (limited to 'zshfunc')
-rwxr-xr-x | zshfunc/update-lit | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zshfunc/update-lit b/zshfunc/update-lit index 97636fa..abd8904 100755 --- a/zshfunc/update-lit +++ b/zshfunc/update-lit @@ -6,7 +6,13 @@ local b=~/projects/uni/lit (cd "$b" && (cd bibtex && git pull) && (cd papers && git pull)) for f in weasel.bib names-long.bib names-short.bib; do - if [ -e "$f" ] ; then cp "$b/bibtex/$f" .; fi - if [ -e "bibs/$f" ] ; then cp "$b/bibtex/$f" bibs; fi + for p in "." "bibs"; do + if [ -e "$p/$f" ] ; then + cp "$b/bibtex/$f" "$p" + if [ -e "$p/$f.local-diff" ]; then + patch "$p/$f" < "$p/$f.local-diff" + fi + fi + done done ) |