mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'fixed custom ftp server'
This commit is contained in:
parent
8eb91d7cca
commit
9825e010f3
1 changed files with 2 additions and 2 deletions
|
@ -752,14 +752,14 @@ select_mirror() {
|
||||||
local _server=$(cat $ANSWER)
|
local _server=$(cat $ANSWER)
|
||||||
if [ "${_server}" = "Custom" ]; then
|
if [ "${_server}" = "Custom" ]; then
|
||||||
DIALOG --inputbox "Enter the full URL to core repo." 8 65 \
|
DIALOG --inputbox "Enter the full URL to core repo." 8 65 \
|
||||||
"ftp://ftp.archlinux.org/core/os/i686" 2>$ANSWER || return 1
|
"ftp://ftp.archlinux.org/core/os/$(uname -m)" 2>$ANSWER || return 1
|
||||||
SYNC_URL=$(cat $ANSWER)
|
SYNC_URL=$(cat $ANSWER)
|
||||||
else
|
else
|
||||||
# Form the full URL for our mirror by grepping for the server name in
|
# 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
|
# our mirrorlist and pulling the full URL out. Substitute 'core' in
|
||||||
# for the repository name, and ensure that if it was listed twice we
|
# for the repository name, and ensure that if it was listed twice we
|
||||||
# only return one line for the mirror.
|
# only return one line for the mirror.
|
||||||
SYNC_URL=$(egrep -o "${_server}.*" "${MIRRORLIST}" | sed "s#\$repo/os/x86_64#core/os/$(uname -m)#g" | head -n1)
|
SYNC_URL=$(egrep -o "${_server}.*" "${MIRRORLIST}" | sed "s#\$repo/#core/#g" | head -n1)
|
||||||
fi
|
fi
|
||||||
echo "Using mirror: $SYNC_URL" >$LOG
|
echo "Using mirror: $SYNC_URL" >$LOG
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue