X-Git-Url: https://www.fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=scripts.git;a=blobdiff_plain;f=bashrc;h=1580fb98c63e94375609f9d490d5e83c4cbc9584;hp=6d1de66fae73d4a83fd8905e175bead18a1fdf2a;hb=54727443ce8762ddf9be8fe541558624c3b20d62;hpb=cabd80dd1cc5eb1263e18a395b05cc6d8279c073 diff --git a/bashrc b/bashrc index 6d1de66..1580fb9 100644 --- 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