cleanup-latex 277 Bytes
Newer Older
1 2 3 4
#!/bin/sh
# Steven Armstrong
# Nico Schottelius
#
5

Nico Schottelius's avatar
Nico Schottelius committed
6 7
set -e

8
DIR="$1"
9 10 11 12 13 14 15 16 17 18

[ -z "${DIR}" ] && DIR="${PWD}"

DIR="${DIR%/}"

if ! [ -d "${DIR}" ]; then
	echo "cannot access ${DIR}: No such file or directory" >&2
	exit 1
fi

Nico Schottelius's avatar
Nico Schottelius committed
19 20
cd "${DIR}"
rm -f *.aux *.nav *.out *.toc *.snm *.log *.vrb