aboutsummaryrefslogtreecommitdiffstats
path: root/roles/jails/22_forge/files/git-shell-commands/delete
diff options
context:
space:
mode:
Diffstat (limited to 'roles/jails/22_forge/files/git-shell-commands/delete')
-rw-r--r--roles/jails/22_forge/files/git-shell-commands/delete11
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/jails/22_forge/files/git-shell-commands/delete b/roles/jails/22_forge/files/git-shell-commands/delete
new file mode 100644
index 0000000..1c1ce0d
--- /dev/null
+++ b/roles/jails/22_forge/files/git-shell-commands/delete
@@ -0,0 +1,11 @@
+#!/bin/sh
+if [ -z "$1" ]; then
+ echo "Usage: delete [REPO_NAME]"
+ exit 1
+fi
+if [ ! -d "$1.git" ]; then
+ echo "Repository $1 does not exist"
+ exit 1
+fi
+rm -rf "$1.git"
+echo "Deleted repository $1"