aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fs_rm.sh
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-07-05 21:07:40 +0800
committerGitHub <noreply@github.com>2024-07-05 21:07:40 +0800
commita7834c98fcbe491c59ab4b0689380fd84596f5ee (patch)
tree34b5b8b633cf0f63e35f3a96e25ed54b36906be5 /tools/fs_rm.sh
parent74789b5a72cd8e3261f196f4e7197ddba92947d0 (diff)
downloadllm-functions-docker-a7834c98fcbe491c59ab4b0689380fd84596f5ee.tar.gz
feat: add fs tools (#59)
Diffstat (limited to 'tools/fs_rm.sh')
-rwxr-xr-xtools/fs_rm.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/fs_rm.sh b/tools/fs_rm.sh
new file mode 100755
index 0000000..3d84fe8
--- /dev/null
+++ b/tools/fs_rm.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+set -e
+
+# @describe Remove the file or directory at the specified path.
+
+# @env FS_BASE_DIR=. The base dir
+# @option --path! The path of the file or directory to remove
+
+main() {
+ path="$FS_BASE_DIR/$argc_path"
+ rm -rf "$path"
+ echo "Path removed: $path"
+}
+
+eval "$(argc --argc-eval "$0" "$@")"