Update.
authorFrancois Fleuret <francois@fleuret.org>
Tue, 17 Jul 2018 09:31:12 +0000 (11:31 +0200)
committerFrancois Fleuret <francois@fleuret.org>
Tue, 17 Jul 2018 09:31:12 +0000 (11:31 +0200)
bashrc

diff --git a/bashrc b/bashrc
index 6d1de66..1580fb9 100644 (file)
--- a/bashrc
+++ b/bashrc
@@ -430,6 +430,23 @@ function trash () {
     echo "Trashed $@"
 }
 
+function trashlatex () {
+    TRASH=$(date +/tmp/trash-latex-${USER}-%Y-%b-%d-%Hh)
+    LINK=/tmp/trash
+
+    mkdir -p ${TRASH}
+
+    [[ -h ${LINK} ]] && \rm ${LINK}
+
+    [[ ! -f ${LINK} ]] && ln -s ${TRASH} ${LINK}
+
+    mv -v \
+       *.log *.pdf *.aux *.nav *.pdfpc *.snm *.toc *.out \
+       *.bbl *.blg \
+       *.*.table *.*.gnuplot \
+       ${TRASH}
+}
+
 ######################################################################
 ## A version of pho which stores the image numbers in environment
 ## variables