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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#!/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/css/font-awesome.min.css" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/fonts/fontawesome-webfont.eot" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/fontawesome-webfont.eot" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/fonts/FontAwesome.otf" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/fonts/fontawesome-webfont.svg" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/fontawesome-webfont.svg" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/fonts/fontawesome-webfont.ttf" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/fontawesome-webfont.ttf" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/fonts/fontawesome-webfont.woff" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/fontawesome-webfont.woff" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/fonts/fontawesome-webfont.woff2" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/fontawesome-webfont.woff2" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/js/bootstrap.min.js" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/css/bootstrap.min.css" || RESULT=3
check_file "$BASE_DIR/themes/mkdocs/js/jquery-1.10.2.min.js" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/js/jquery-2.1.1.min.js" || RESULT=3
check_file "$BASE_DIR/contrib/search/templates/search/lunr.js" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/js/modernizr-2.8.3.min.js" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/css/theme.css" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-Bold.ttf" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-Bold.woff2" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-BoldItalic.ttf" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-BoldItalic.woff2" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-Italic.ttf" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-Italic.woff2" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-Regular.ttf" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/Lato-Regular.woff2" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/RobotoSlab-Bold.woff2" || RESULT=3
check_file "$BASE_DIR/themes/readthedocs/fonts/RobotoSlab-Regular.woff2" || 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/css/font-awesome.min.css" || RESULT=4
check_file "$BASE_DIR/fonts/fontawesome-webfont.eot" || RESULT=4
check_file "$BASE_DIR/fonts/FontAwesome.otf" || RESULT=4
check_file "$BASE_DIR/fonts/fontawesome-webfont.svg" || RESULT=4
check_file "$BASE_DIR/fonts/fontawesome-webfont.ttf" || RESULT=4
check_file "$BASE_DIR/fonts/fontawesome-webfont.woff" || RESULT=4
check_file "$BASE_DIR/fonts/fontawesome-webfont.woff2" || RESULT=4
check_file "$BASE_DIR/js/bootstrap.min.js" || RESULT=4
check_file "$BASE_DIR/css/bootstrap.min.css" || RESULT=4
check_file "$BASE_DIR/js/jquery-1.10.2.min.js" || RESULT=4
check_file "$BASE_DIR/search/lunr.js" || RESULT=4
exit "$RESULT"
|