summaryrefslogtreecommitdiffstats
path: root/tests/remove-sibling.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/remove-sibling.sh')
-rwxr-xr-xtests/remove-sibling.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/remove-sibling.sh b/tests/remove-sibling.sh
new file mode 100755
index 0000000..ddf81d7
--- /dev/null
+++ b/tests/remove-sibling.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+for file in "${1%/*}"/*; do
+ if [ "$file" != "$1" ]; then
+ rm "$file"
+ exit $?
+ fi
+done
+
+exit 1