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

scripts: update: replace evals with indirection

parent deae3d10
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# shellcheck disable=SC2154
set -e
......@@ -10,10 +9,14 @@ GLUONDIR="$(pwd)"
for module in $GLUON_MODULES; do
echo "--- Updating module '$module' ---"
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_')
eval 'repo=${'"${var}"'_REPO}'
eval 'branch=${'"${var}"'_BRANCH}'
eval 'commit=${'"${var}"'_COMMIT}'
var=${module//\//_}
_remote_url=${var^^}_REPO
_remote_branch=${var^^}_BRANCH
_remote_commit=${var^^}_COMMIT
repo=${!_remote_url}
branch=${!_remote_branch}
commit=${!_remote_commit}
mkdir -p "$GLUONDIR/$module"
cd "$GLUONDIR/$module"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment