Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
e246a38e
Commit
e246a38e
authored
Aug 01, 2020
by
Igor Pecovnik
Browse files
Remove deprecated mirror selection since we enabled automatic redirection
parent
19e6094a
Changes
2
Hide whitespace changes
Inline
Side-by-side
debian-config-jobs
View file @
e246a38e
...
...
@@ -1256,45 +1256,6 @@ function jobs ()
;;
# Change to other mirrors
#
"Mirror"
)
IFS
=
$'
\r\n
'
GLOBIGNORE
=
'*'
LIST_CONST
=
3
BEFORE
=
"
$(
cat
/etc/apt/sources.list.d/armbian.list |
sed
's/http/\nhttp/g'
|
grep
^http |
sed
's/\(^http[^ <]*\)\(.*\)/\1/g'
|
sed
's/https\?:\/\///'
)
"
BEFORE_DESC
=
$(
description
"
${
BEFORE
}
"
)
PREFIX
=
"
$(
echo
$BEFORE
|
cut
-f1
-d
"."
)
"
AVAL_MIRROR
=()
if
[[
$PREFIX
==
beta
]]
;
then
AVAL_MIRROR
=(
"beta.armbian.com"
"mirrors.netix.net/armbian/apt/"
)
else
AVAL_MIRROR+
=(
"apt.armbian.com"
"mirrors.tuna.tsinghua.edu.cn/armbian/"
"mirrors.netix.net/armbian/apt/"
"mirrors.dotsrc.org/armbian-apt/"
)
fi
local
LIST
=()
for
i
in
"
${
AVAL_MIRROR
[@]
}
"
do
DESC
=
$(
description
"
${
i
[0]
}
"
)
[[
"
${
i
[0]
}
"
!=
"
$BEFORE
"
]]
&&
LIST+
=(
"
${
i
[0]//[[
:blank:]]/
}
"
"
$DESC
"
)
done
LIST_LENGTH
=
$((
$LIST_CONST
+
${#
LIST
[@]
}
/
2
))
;
if
[
"
$LIST_LENGTH
"
-le
3
]
;
then
TARGET_MIRROR
=
${
AVAL_MIRROR
[0]
}
dialog
--backtitle
"
$BACKTITLE
"
--title
"Please wait"
--colors
--msgbox
"
\n
There are no mirrors available!"
7 35
else
exec
3>&1
TARGET_MIRROR
=
$(
dialog
--cancel-label
"Cancel"
--backtitle
"
$BACKTITLE
"
--no-collapse
\
--title
"Change repository location"
--colors
--clear
--menu
"
\n
from
\Z
1
$BEFORE_DESC
\Z
0 to:
\n
"
$((
6
+
${
LIST_LENGTH
}))
60 15
"
${
LIST
[@]
}
"
2>&1 1>&3
)
exitstatus
=
$?
;
exec
3>&-
fi
if
[[
$exitstatus
==
0
]]
;
then
sed
-i
"s~
$BEFORE
~
$TARGET_MIRROR
~"
/etc/apt/sources.list.d/armbian.list
dialog
--backtitle
"
$BACKTITLE
"
--title
"Info"
--colors
--msgbox
"
\n
Armbian package repository was switched to:
\n\n\Z
1
$TARGET_MIRROR
\Z
0"
9 47
fi
;;
# Toggle welcome screen items
#
...
...
debian-config-submenu
View file @
e246a38e
...
...
@@ -316,9 +316,6 @@ while true; do
LIST+
=(
"Locales"
"Reconfigure language
\Z
5(
$(
locale |
grep
LANGUAGE |
cut
-d
=
-f2
|
cut
-d_
-f1
)
)
\Z
0 and character set"
)
LIST+
=(
"Keyboard"
"Change console keyboard layout (
\Z
5
$(
cat
/etc/default/keyboard |
grep
XKBLAYOUT |
grep
-o
'".*"'
|
sed
's/"//g'
)
\Z
0)"
)
LIST+
=(
"Hostname"
"Change your hostname
\Z
5(
$(
cat
/etc/hostname
)
)
\Z
0"
)
BEFORE
=
"
$(
cat
/etc/apt/sources.list.d/armbian.list |
sed
's/http/\nhttp/g'
|
grep
^http |
sed
's/\(^http[^ <]*\)\(.*\)/\1/g'
|
sed
's/https\?:\/\///'
)
"
BEFORE_DESC
=
$(
description
"
${
BEFORE
}
"
)
[[
-f
/etc/apt/sources.list.d/armbian.list
]]
&&
LIST+
=(
"Mirror"
"Change repository server
\Z
5(
${
BEFORE_DESC
}
)
\Z
0"
)
LIST+
=(
"Welcome"
"Toggle welcome screen items"
)
# count number of menu items to adjust window sizee
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment