summaryrefslogtreecommitdiff
path: root/config/services/git/shell-commands/repo/src/remove_command.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/services/git/shell-commands/repo/src/remove_command.sh')
-rw-r--r--config/services/git/shell-commands/repo/src/remove_command.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/config/services/git/shell-commands/repo/src/remove_command.sh b/config/services/git/shell-commands/repo/src/remove_command.sh
new file mode 100644
index 0000000..b45406f
--- /dev/null
+++ b/config/services/git/shell-commands/repo/src/remove_command.sh
@@ -0,0 +1,10 @@
+path=$(realpath "${args[path]}")
+
+check-realpath "$path"
+
+if [[ $(is-git-dir "$path") ]]
+then
+ rm --recursive "$path"
+else
+ rm --dir "$path"
+fi