/usr/bin/click-run-checks is in click-reviewers-tools 0.5build1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
if [ -z "$1" ]; then
echo "Please specific path to click package"
exit 1
fi
c="$1"
if [ ! -f "$c" ]; then
echo "Could not find '$c'"
exit 1
fi
# prefer local script for testing, otherwise use system location
prefer_local() {
path="$(dirname $(readlink -f "$0"))/$1"
if [ -x $path ]; then
"$path" "$2" || set_rc "$?"
return
fi
"$(which $1)" "$2" || set_rc "$?"
}
rc="0"
set_rc() {
# return worst offending rc
if [ "$1" = "1" ]; then
if [ "$rc" != "2" ]; then
rc="$1"
fi
elif [ "$1" = "2" ]; then
rc="$1"
fi
}
prefer_local click-show-files "$c"
echo ""
echo "= click-check-lint ="
prefer_local click-check-lint "$c"
echo ""
echo "= click-check-desktop ="
prefer_local click-check-desktop "$c"
echo ""
echo "= click-check-security ="
prefer_local click-check-security "$c"
echo ""
echo "= click-check-functional ="
prefer_local click-check-functional "$c"
echo ""
echo ""
if [ "$rc" = "1" ]; then
echo "** Warnings found **"
elif [ "$rc" = "2" ]; then
echo "** Errors found **"
fi
echo -n "$c: "
if [ "$rc" = "0" ]; then
echo "pass"
else
echo "FAIL"
fi
exit $rc
|