aboutsummaryrefslogtreecommitdiff
path: root/clean.sh
blob: c8a4e4d2632e5fbf11c475528d98dbc95f06a33f (plain)
1
2
3
4
5
6
7
#!/usr/bin/env bash
set -euxo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
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