aboutsummaryrefslogtreecommitdiff
path: root/clean.sh
diff options
context:
space:
mode:
Diffstat (limited to 'clean.sh')
-rwxr-xr-xclean.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/clean.sh b/clean.sh
new file mode 100755
index 0000000..d37cd91
--- /dev/null
+++ b/clean.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+set -euxo pipefail
+git status --porcelain=v1 --ignored -z \
+| grep -z '^!!' \
+| xargs -0 awk 'BEGIN { for(i = 1; i < ARGC; i++) printf "%s%c", substr(ARGV[i], 4), 0; }' \
+| xargs -0 rm -r