We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 527697b commit deddf23Copy full SHA for deddf23
clean.sh
@@ -1,7 +1,11 @@
1
#! /usr/bin/env bash
2
3
# delete the files and symlinks (but don't follow links)
4
-find -P work/?? -type f -print0 -o -type l -print0 | xargs -0 munlink 2&>/dev/null
+if [[ $(which munlink) ]]; then
5
+ find -P work/?? -type f -print0 -o -type l -print0 | xargs -0 munlink 2&>/dev/null
6
+else
7
+ find -P work/?? -type f -delete -o -type l -delete
8
+fi
9
10
# delete the empty directories
11
find -P work/?? -type d -empty -delete
0 commit comments