Files
scwrypts/zsh/office/latex/cleanup
T

16 lines
448 B
Bash
Raw Normal View History

2022-08-09 17:42:31 -06:00
#!/bin/zsh
2023-02-21 18:44:27 -07:00
use office/latex
2022-08-09 17:42:31 -06:00
#####################################################################
2024-02-06 14:06:44 -07:00
MAIN() {
2023-10-30 14:23:23 -06:00
local DIRECTORY=$(SCWRYPTS__GET_REALPATH ".")
2023-02-21 18:44:27 -07:00
[ $1 ] && DIRECTORY="$(dirname "$(LATEX__GET_MAIN_FILENAME "$1")")"
2022-08-09 17:42:31 -06:00
[ $DIRECTORY ] && [ -d $DIRECTORY ] \
2023-02-21 18:44:27 -07:00
|| FAIL 1 'unable to parse valid directory'
2022-08-09 17:42:31 -06:00
cd $DIRECTORY
rm $(ls | grep '\.\(aux\)\|\(log\)\|\(pdf\)\|\(out\)\|\(dvi\)$')
2023-02-21 18:44:27 -07:00
SUCCESS "cleaned up latex artifacts in '$DIRECTORY'"
2022-08-09 17:42:31 -06:00
}