rank_mirrors is broken
Most likely the branch choice sets empty string as branch.
rank_mirrors() {
#Choose the branch for mirrorlist
DIALOG " $_MirrorBranch " --radiolist "\n$_UseSpaceBar\n " 0 0 3 \
"stable" "-" on \
"testing" "-" off \
"unstable" "-" off 2>${ANSWER}
local branch="$(<{ANSWER})"
clear
if [[ ! -z ${branch} ]]; then
pacman-mirrors -gib "${branch}"
ini branch "${branch}"
fi
}
If we are using the temporary file ${ANSWER} anyway, why not just cat it like all the other options do?
Also, we should have some kind of infobox telling the user how to exit the mirror choice screen. It is quite unintuitive.