disk-usage (266B)
1 #!/bin/sh 2 3 [ "$@" = "" ] && args=-h 4 5 [ "$@" != "" ] && 6 [ "$@" != "-s" ] && 7 [ "$@" != "-h" ] && 8 [ "$@" != "-sh" ] && 9 echo "usage: git du [-sh]" && 10 exit 1 11 12 ( 13 [ -d ./.git ] && du "${args:-$@}" .git || du "${args:-$@}" . 14 ) | tail -n 1 | awk '{print "Repo: " $1}'