Skip to content

Commit deddf23

Browse files
committed
use munlink if available
1 parent 527697b commit deddf23

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

clean.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
#! /usr/bin/env bash
22

33
# 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
4+
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
59

610
# delete the empty directories
711
find -P work/?? -type d -empty -delete

0 commit comments

Comments
 (0)