stagit-rm (400B)
1 #!/bin/sh 2 # Author: zakaria @ zakaria.org 3 # License: MIT 4 # Usage: stagit-rm <repo> 5 6 set -eu 7 8 . /var/git/config.rc 9 10 log() { 11 printf '%s\n' "$*" >&2 12 } 13 die() { 14 log "error: $*" 15 printf 'exiting...\n' 16 exit 1 17 } 18 19 REPO="$1" 20 21 if [ -z "$REPO" ]; then 22 die "no repo name provided" 23 fi 24 25 REPO_PATH="${GIT_REPOS}/${REPO}.git" 26 27 rm -rvf "$REPO_PATH" 28 rm -rvf "${WWW_HOME}/${REPO}"