aboutsummaryrefslogtreecommitdiffstats
path: root/.local/bin/cleanup-after-bad-patch
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-06-13 16:11:26 -0400
committerCameron Katri <me@cameronkatri.com>2021-06-13 16:11:26 -0400
commit8ceda16d9eb3ff274aaf35df700868d3d90269db (patch)
tree421070fe136171a54e129571c9f576a664e9c6e6 /.local/bin/cleanup-after-bad-patch
downloaddotfiles-8ceda16d9eb3ff274aaf35df700868d3d90269db.tar.gz
dotfiles-8ceda16d9eb3ff274aaf35df700868d3d90269db.tar.zst
dotfiles-8ceda16d9eb3ff274aaf35df700868d3d90269db.zip
Initial dotfiles
Diffstat (limited to '.local/bin/cleanup-after-bad-patch')
-rwxr-xr-x.local/bin/cleanup-after-bad-patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/.local/bin/cleanup-after-bad-patch b/.local/bin/cleanup-after-bad-patch
new file mode 100755
index 0000000..8a6cf42
--- /dev/null
+++ b/.local/bin/cleanup-after-bad-patch
@@ -0,0 +1,18 @@
+#!/bin/sh
+if [ "$1" == "-n" ]; then
+find . '(' \
+ -name \*-baseline -o \
+ -name \*-merge -o \
+ -name \*-original -o \
+ -name \*.orig -o \
+ -name \*.rej \
+')'
+else
+find . '(' \
+ -name \*-baseline -o \
+ -name \*-merge -o \
+ -name \*-original -o \
+ -name \*.orig -o \
+ -name \*.rej \
+')' -delete
+fi