|
|
@ -17,22 +17,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
set -euo pipefail
|
|
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
|
|
[ -n "${DEBUG:-}" ] && set -x
|
|
|
|
|
|
|
|
srcdir="$(dirname "$0")"
|
|
|
|
|
|
|
|
|
|
|
|
usage(){
|
|
|
|
# shellcheck disable=SC1090
|
|
|
|
if [ -n "$*" ]; then
|
|
|
|
. "$srcdir/lib/utils.sh"
|
|
|
|
echo "$@"
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
usage: ${0##*/} <files>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EOF
|
|
|
|
# shellcheck disable=SC2034
|
|
|
|
exit 3
|
|
|
|
usage_args="<files>"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for x in $@; do
|
|
|
|
for x in "$@"; do
|
|
|
|
case $x in
|
|
|
|
case "$x" in
|
|
|
|
-h|--help) usage
|
|
|
|
-h|--help) usage
|
|
|
|
;;
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
esac
|
|
|
@ -40,8 +34,8 @@ done
|
|
|
|
|
|
|
|
|
|
|
|
found=0
|
|
|
|
found=0
|
|
|
|
|
|
|
|
|
|
|
|
while read module; do
|
|
|
|
while read -r module ; do
|
|
|
|
grep "^$module[<>=]" "$@"
|
|
|
|
grep "^${module}[<>=]" "$@"
|
|
|
|
((found++))
|
|
|
|
((found++))
|
|
|
|
done < <(
|
|
|
|
done < <(
|
|
|
|
sed 's/#.*//;
|
|
|
|
sed 's/#.*//;
|
|
|
|