Add validation script for broken symlinks
Change-Id: Iae6d9f26e1a8dd7d565e9dbd815816c26cb92b74 Partially-implements: blueprint add-broken-symlink-check
This commit is contained in:
parent
3a4500c122
commit
e6ef6218da
9
tools/validate-links.sh
Executable file
9
tools/validate-links.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user