uz (221B)
1 #!/usr/bin/env bash 2 3 if [[ $# != 1 ]]; then 4 echo "usage: uz ZIPFILE" 5 exit 1 6 fi 7 8 # TODO don't create new directory if zip already contains one 9 mkdir "${1%.zip}" 10 mv "$1" "${1%.zip}" 11 cd "${1%.zip}" 12 unzip "$1" 13 rm -f "$1"