Interactively choose where to download Debian packages from
This commit is contained in:
parent
0b0975e1d9
commit
a92641f62e
112
src/freedombone
112
src/freedombone
|
@ -575,6 +575,118 @@ function interactive_configuration {
|
|||
esac
|
||||
save_configuration_file
|
||||
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
--radiolist "Where to download Debian packages from:" 25 45 49 \
|
||||
1 "Australia" off \
|
||||
2 "Austria" off \
|
||||
3 "Belarus" off \
|
||||
4 "Belgium" off \
|
||||
5 "Bosnia and Herzegovina" off \
|
||||
6 "Brazil" off \
|
||||
7 "Bulgaria" off \
|
||||
8 "Canada" off \
|
||||
9 "Chile" off \
|
||||
10 "China" off \
|
||||
11 "Croatia" off \
|
||||
12 "Czech Republic" off \
|
||||
13 "Denmark" off \
|
||||
14 "El Salvador" off \
|
||||
15 "Estonia" off \
|
||||
16 "Finland" off \
|
||||
17 "France 1" off \
|
||||
18 "France 2" off \
|
||||
19 "Germany 1" off \
|
||||
20 "Germany 2" off \
|
||||
21 "Greece" off \
|
||||
22 "Hungary" off \
|
||||
23 "Iceland" off \
|
||||
24 "Iran" off \
|
||||
25 "Ireland" off \
|
||||
26 "Italy" off \
|
||||
27 "Japan" off \
|
||||
28 "Korea" off \
|
||||
29 "Lithuania" off \
|
||||
30 "Mexico" off \
|
||||
31 "Netherlands" off \
|
||||
32 "New Caledonia" off \
|
||||
33 "New Zealand" off \
|
||||
34 "Norway" off \
|
||||
35 "Poland" off \
|
||||
36 "Portugal" off \
|
||||
37 "Romania" off \
|
||||
38 "Russia" off \
|
||||
39 "Slovakia" off \
|
||||
40 "Slovenia" off \
|
||||
41 "Spain" off \
|
||||
42 "Sweden" off \
|
||||
43 "Switzerland" off \
|
||||
44 "Taiwan" off \
|
||||
45 "Thailand" off \
|
||||
46 "Turkey" off \
|
||||
47 "Ukraine" off \
|
||||
48 "United Kingdom" off \
|
||||
49 "United States" on 2> $data
|
||||
sel=$?
|
||||
case $sel in
|
||||
1) exit 0;;
|
||||
255) exit 0;;
|
||||
esac
|
||||
case $(cat $data) in
|
||||
1) DEBIAN_REPO='ftp.au.debian.org';;
|
||||
2) DEBIAN_REPO='ftp.at.debian.org';;
|
||||
3) DEBIAN_REPO='ftp.by.debian.org';;
|
||||
4) DEBIAN_REPO='ftp.be.debian.org';;
|
||||
5) DEBIAN_REPO='ftp.ba.debian.org';;
|
||||
6) DEBIAN_REPO='ftp.br.debian.org';;
|
||||
7) DEBIAN_REPO='ftp.bg.debian.org';;
|
||||
8) DEBIAN_REPO='ftp.ca.debian.org';;
|
||||
9) DEBIAN_REPO='ftp.cl.debian.org';;
|
||||
10) DEBIAN_REPO='ftp.cn.debian.org';;
|
||||
11) DEBIAN_REPO='ftp.hr.debian.org';;
|
||||
12) DEBIAN_REPO='ftp.cz.debian.org';;
|
||||
13) DEBIAN_REPO='ftp.dk.debian.org';;
|
||||
14) DEBIAN_REPO='ftp.sv.debian.org';;
|
||||
15) DEBIAN_REPO='ftp.ee.debian.org';;
|
||||
16) DEBIAN_REPO='ftp.fi.debian.org';;
|
||||
17) DEBIAN_REPO='ftp2.fr.debian.org';;
|
||||
18) DEBIAN_REPO='ftp.fr.debian.org';;
|
||||
19) DEBIAN_REPO='ftp2.de.debian.org';;
|
||||
20) DEBIAN_REPO='ftp.de.debian.org';;
|
||||
21) DEBIAN_REPO='ftp.gr.debian.org';;
|
||||
22) DEBIAN_REPO='ftp.hu.debian.org';;
|
||||
23) DEBIAN_REPO='ftp.is.debian.org';;
|
||||
24) DEBIAN_REPO='ftp.ir.debian.org';;
|
||||
25) DEBIAN_REPO='ftp.ie.debian.org';;
|
||||
26) DEBIAN_REPO='ftp.it.debian.org';;
|
||||
27) DEBIAN_REPO='ftp.jp.debian.org';;
|
||||
28) DEBIAN_REPO='ftp.kr.debian.org';;
|
||||
29) DEBIAN_REPO='ftp.lt.debian.org';;
|
||||
30) DEBIAN_REPO='ftp.mx.debian.org';;
|
||||
31) DEBIAN_REPO='ftp.nl.debian.org';;
|
||||
32) DEBIAN_REPO='ftp.nc.debian.org';;
|
||||
33) DEBIAN_REPO='ftp.nz.debian.org';;
|
||||
34) DEBIAN_REPO='ftp.no.debian.org';;
|
||||
35) DEBIAN_REPO='ftp.pl.debian.org';;
|
||||
36) DEBIAN_REPO='ftp.pt.debian.org';;
|
||||
37) DEBIAN_REPO='ftp.ro.debian.org';;
|
||||
38) DEBIAN_REPO='ftp.ru.debian.org';;
|
||||
39) DEBIAN_REPO='ftp.sk.debian.org';;
|
||||
40) DEBIAN_REPO='ftp.si.debian.org';;
|
||||
41) DEBIAN_REPO='ftp.es.debian.org';;
|
||||
42) DEBIAN_REPO='ftp.se.debian.org';;
|
||||
43) DEBIAN_REPO='ftp.ch.debian.org';;
|
||||
44) DEBIAN_REPO='ftp.tw.debian.org';;
|
||||
45) DEBIAN_REPO='ftp.th.debian.org';;
|
||||
46) DEBIAN_REPO='ftp.tr.debian.org';;
|
||||
47) DEBIAN_REPO='ftp.ua.debian.org';;
|
||||
48) DEBIAN_REPO='ftp.uk.debian.org';;
|
||||
49) DEBIAN_REPO='ftp.us.debian.org';;
|
||||
255) exit 0;;
|
||||
esac
|
||||
save_configuration_file
|
||||
|
||||
data=$(tempfile 2>/dev/null)
|
||||
trap "rm -f $data" 0 1 2 5 15
|
||||
dialog --backtitle "Freedombone Configuration" \
|
||||
|
|
Loading…
Reference in New Issue