1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
#!/bin/sh
RESULT=0
check_file() {
local TARGET_FILE="$1"
echo -n "Checking file $TARGET_FILE"
if ! [ -f "$TARGET_FILE" ]; then
echo " MISSING"
return 1
else
echo " OK"
fi
return 0
}
if ! [ -d /usr/lib/python3/dist-packages/mkdocs ]; then
echo "Cannot read /usr/lib/python3/dist-packages/mkdocs" >&2
exit 1
fi
if ! [ -d /usr/share/doc/mkdocs ]; then
echo "Cannot read /usr/share/doc/mkdocs" >&2
exit 2
fi
echo "Checking mkdocs links:"
BASE_DIR="/usr/lib/python3/dist-packages/mkdocs"
check_file "$BASE_DIR/themes/mkdocs/js/bootstrap.bundle.min.js" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/js/bootstrap.bundle.min.js.map" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/css/bootstrap.min.css" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/css/bootstrap.min.css.map" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/js/jquery-3.6.0.min.js" || RESULT=3
check_file "$BASE_DIR/contrib/search/templates/search/lunr.js" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/css/theme.css" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/js/theme.js" || RESULT=3
echo "Checking mkdocs-doc links:"
BASE_DIR="/usr/share/doc/mkdocs/html"
check_file "$BASE_DIR/js/bootstrap.bundle.min.js" || RESULT=4
check_file "$BASE_DIR/js/bootstrap.bundle.min.js.map" || RESULT=4
check_file "$BASE_DIR/css/bootstrap.min.css" || RESULT=4
check_file "$BASE_DIR/css/bootstrap.min.css.map" || RESULT=4
check_file "$BASE_DIR/js/jquery-3.6.0.min.js" || RESULT=4
check_file "$BASE_DIR/search/lunr.js" || RESULT=4
exit "$RESULT"
|