Skip to content
Snippets Groups Projects
Commit b6f7e4bc authored by Grische's avatar Grische
Browse files

scripts: module-check: replace eval with indirection

parent cf0d2ced
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# shellcheck disable=SC2154
set -e
......@@ -15,8 +14,10 @@ fi
need_sync=false
for module in $GLUON_MODULES; do
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_')
eval 'commit_expected=${'"${var}"'_COMMIT}'
echo "Checking module '$module'"
var=${module//\//_}
_remote_commit=${var^^}_COMMIT
commit_expected=${!_remote_commit}
prefix=invalid
cd "$GLUONDIR/$module" 2>/dev/null && prefix="$(git rev-parse --show-prefix 2>/dev/null)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment