kolla-ansible/tools/validate-links.sh
Martin André e6ef6218da Add validation script for broken symlinks
Change-Id: Iae6d9f26e1a8dd7d565e9dbd815816c26cb92b74
Partially-implements: blueprint add-broken-symlink-check
2015-07-02 09:09:41 +09:00

10 lines
227 B
Bash
Executable File

#!/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