Add validation script for broken symlinks

Change-Id: Iae6d9f26e1a8dd7d565e9dbd815816c26cb92b74
Partially-implements: blueprint add-broken-symlink-check
This commit is contained in:
Martin André 2015-07-01 17:14:06 +09:00
parent 3a4500c122
commit e6ef6218da

9
tools/validate-links.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
cd "$(dirname "$REAL_PATH")/.."
echo "Checking for broken links"
if find . -type l -exec test ! -e {} \; -print | egrep '.*'; then
exit 1
fi