diff options
Diffstat (limited to 'storage/ndb/tools/clean-links.sh')
-rwxr-xr-x | storage/ndb/tools/clean-links.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/storage/ndb/tools/clean-links.sh b/storage/ndb/tools/clean-links.sh new file mode 100755 index 00000000000..01820f30616 --- /dev/null +++ b/storage/ndb/tools/clean-links.sh @@ -0,0 +1,21 @@ +#! /bin/sh + +# 1 - Dir +# 2 - Link dst + +if [ $# -lt 1 ] +then + exit 0 +fi + +files=`find $1 -type l -maxdepth 1` +res=$? +if [ $res -ne 0 ] || [ "$files" = "" ] +then + exit 0 +fi + +rm -f $files + + + |