summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-ui-interactive.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/libs/lib-ui-interactive.sh')
-rw-r--r--src/core/libs/lib-ui-interactive.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 851e990..343ecc4 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -865,13 +865,12 @@ interactive_select_mirror() {
local _server=$ANSWER_OPTION
if [ "${_server}" = "Custom" ]; then
ask_string "Enter the full URL to core repo." "ftp://ftp.archlinux.org/core/os/$var_ARCH" || return 1
- var_SYNC_URL=$ANSWER_STRING
+ var_SYNC_URL=${ANSWER_STRING/\/core\///\$repo/} #replace '/core/' by '/$repo/'
else
# Form the full URL for our mirror by grepping for the server name in
- # our mirrorlist and pulling the full URL out. Substitute 'core' in
- # for the repository name, and ensure that if it was listed twice we
- # only return one line for the mirror.
- var_SYNC_URL=$(egrep -o "${_server}.*" "${var_MIRRORLIST}" | sed 's/\$repo/core/g' | head -n1)
+ # our mirrorlist and pulling the full URL out.
+ # Ensure that if it was listed twice we only return one line for the mirror.
+ var_SYNC_URL=$(egrep -o "${_server}.*" "${var_MIRRORLIST}" | head -n1)
fi
echo "Using mirror: $var_SYNC_URL" >$LOG
}