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

scripts: update: replace evals with indirection

parent deae3d10
Branches
Tags
No related merge requests found
#!/bin/bash #!/bin/bash
# shellcheck disable=SC2154
set -e set -e
...@@ -10,10 +9,14 @@ GLUONDIR="$(pwd)" ...@@ -10,10 +9,14 @@ GLUONDIR="$(pwd)"
for module in $GLUON_MODULES; do for module in $GLUON_MODULES; do
echo "--- Updating module '$module' ---" echo "--- Updating module '$module' ---"
var=$(echo "$module" | tr '[:lower:]/' '[:upper:]_') var=${module//\//_}
eval 'repo=${'"${var}"'_REPO}' _remote_url=${var^^}_REPO
eval 'branch=${'"${var}"'_BRANCH}' _remote_branch=${var^^}_BRANCH
eval 'commit=${'"${var}"'_COMMIT}' _remote_commit=${var^^}_COMMIT
repo=${!_remote_url}
branch=${!_remote_branch}
commit=${!_remote_commit}
mkdir -p "$GLUONDIR/$module" mkdir -p "$GLUONDIR/$module"
cd "$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