21 lines
617 B
Plaintext
21 lines
617 B
Plaintext
|
#!/bin/zsh
|
||
|
_DEPENDENCIES+=()
|
||
|
_REQUIRED_ENV+=()
|
||
|
source ${0:a:h}/common.zsh
|
||
|
#####################################################################
|
||
|
|
||
|
CLEAN_LATEX_LOGFILES() {
|
||
|
local DIRECTORY=$(__GET_PATH_TO_RELATIVE_ARGUMENT ".")
|
||
|
[ $1 ] && DIRECTORY="$(dirname "$(GET_MAIN_LATEX_FILENAME "$1")")"
|
||
|
[ $DIRECTORY ] && [ -d $DIRECTORY ] \
|
||
|
|| __FAIL 1 'unable to parse valid directory'
|
||
|
|
||
|
cd $DIRECTORY
|
||
|
rm $(ls | grep '\.\(aux\)\|\(log\)\|\(pdf\)\|\(out\)\|\(dvi\)$')
|
||
|
|
||
|
__SUCCESS "cleaned up latex artifacts in '$DIRECTORY'"
|
||
|
}
|
||
|
|
||
|
#####################################################################
|
||
|
CLEAN_LATEX_LOGFILES $@
|