From 682d9e7d44079b3c2be4c2bc5b859dbdb6ac4ca6 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 19 Apr 2017 11:56:33 -0400 Subject: test: rm git-shell-commands/delete-repo --- git-shell-commands/delete-repo | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 git-shell-commands/delete-repo (limited to 'git-shell-commands/delete-repo') diff --git a/git-shell-commands/delete-repo b/git-shell-commands/delete-repo deleted file mode 100755 index 04e896b..0000000 --- a/git-shell-commands/delete-repo +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash -# * delete-repo REPO [REPO2...] -# Allows users to delete REPO.git permanently -# Example: delete-repo packages/libretools packages/pbs-tools - -set -e - -for repo in "$@"; do - repo="$(sed -r 's,^/*,,' <<<"$repo")" - _repo="$(sed -r -e '/(^|\/)\.\.($|\/)/d' -e "s,[^A-Za-z0-9\./_~-],,g" <<<"$repo")" - test "$repo" != "$_repo" && { printf 'Illegal name: %s\n' "${repo}"; continue; } - test ! -d "$repo".git && { printf 'Does not exist: %s\n' "${repo}"; continue; } - - echo "Removing ${repo}.git" - # lo and behold absolute horror - rm -rf -- "$repo".git -done -- cgit v1.2.3-54-g00ecf