Last Updated: February 25, 2016
·
549
· darktim

create temporary directory with random name which will be deleted after script run

WDIR="$(mktemp -d "/tmp/${0}.XXXXXX")"
trap 'rm -rf "${WDIR}"' EXIT INT HUP