Skip to content

Commit

Permalink
Reuse existing repo_name variable
Browse files Browse the repository at this point in the history
  • Loading branch information
jpopelka committed Apr 30, 2024
1 parent 6819a37 commit d941d7b
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions mtps-get-task
Original file line number Diff line number Diff line change
Expand Up @@ -767,20 +767,15 @@ else
repo_file_text="$(mk_repo "$TASK" "$REPODIR" "1")"
repo_name="brew-${TASK}"
fi
echo "Repo file:"
echo "$repo_file_text"
id="$(id -u)"

id="$(id -u)"
if [[ -n "$INSTALLREPOFILE" && "$id" -eq 0 ]]; then
if [ -n "$REPOFILENAME" ]; then
repofile="/etc/yum.repos.d/${REPOFILENAME}.repo"
else
repofile="/etc/yum.repos.d/brew-${TASK}.repo"
fi

repofile="/etc/yum.repos.d/${repo_name}.repo"
echo "Creating repo file: $repofile"
echo "$repo_file_text" > "$repofile"
fi
echo "Repo file content:"
echo "$repo_file_text"

# Query packages in the created repo
nevras_in_repo="$(
Expand Down

0 comments on commit d941d7b

Please sign in to comment.