diff options
-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 ) |