Artifact 2e6a90f3c89a3533c755a12410e21f6f0ac9babf:
- Executable file utils/cleanup-links-dir.sh — part of check-in [93a73acc32] at 2012-04-03 22:44:06 on branch run-locks — Run locks (user: matt, size: 399) [annotate] [blame] [check-ins using] [more...]
#!/usr/bin/env bash export LINKSDIR=$1 export RUNSDIR=$2 if [ "x$LINKSDIR" == "x" ];then echo Usage: cleanup-links-dir /links/dir/path /runs/dir/path exit fi echo Removing dangling links.... for lnk in `find $LINKSDIR -type l ! -exec test -r {} \; -print`; do echo $lnk rm -f $lnk done echo Removing empty directories.... find $LINKSDIR -depth -type d -empty -print -exec rmdir {} \;