- if [[ $1 == *[^/].git ]]; then
- if [[ $2 ]]; then
- workingdir="$2"
- else
- workingdir="${1##*/}"
- workingdir="${workingdir%.git}"
- fi
- elif (( $# == 2 )); then
- echo error: 2 arguments given but the first does not end in .git
- echo "$help"
- return 1