Selaa lähdekoodia

Interactively choose where to download Debian packages from

Bob Mottram 10 vuotta sitten
vanhempi
commit
a92641f62e
1 muutettua tiedostoa jossa 112 lisäystä ja 0 poistoa
  1. 112
    0
      src/freedombone

+ 112
- 0
src/freedombone Näytä tiedosto

@@ -578,6 +578,118 @@ function interactive_configuration {
578 578
   data=$(tempfile 2>/dev/null)
579 579
   trap "rm -f $data" 0 1 2 5 15
580 580
   dialog --backtitle "Freedombone Configuration" \
581
+      --radiolist "Where to download Debian packages from:" 25 45 49 \
582
+      1 "Australia" off \
583
+      2 "Austria" off \
584
+      3 "Belarus" off \
585
+      4 "Belgium" off \
586
+      5 "Bosnia and Herzegovina" off \
587
+      6 "Brazil" off \
588
+      7 "Bulgaria" off \
589
+      8 "Canada" off \
590
+      9 "Chile" off \
591
+      10 "China" off \
592
+      11 "Croatia" off \
593
+      12 "Czech Republic" off \
594
+      13 "Denmark" off \
595
+      14 "El Salvador" off \
596
+      15 "Estonia" off \
597
+      16 "Finland" off \
598
+      17 "France 1" off \
599
+      18 "France 2" off \
600
+      19 "Germany 1" off \
601
+      20 "Germany 2" off \
602
+      21 "Greece" off \
603
+      22 "Hungary" off \
604
+      23 "Iceland" off \
605
+      24 "Iran" off \
606
+      25 "Ireland" off \
607
+      26 "Italy" off \
608
+      27 "Japan" off \
609
+      28 "Korea" off \
610
+      29 "Lithuania" off \
611
+      30 "Mexico" off \
612
+      31 "Netherlands" off \
613
+      32 "New Caledonia" off \
614
+      33 "New Zealand" off \
615
+      34 "Norway" off \
616
+      35 "Poland" off \
617
+      36 "Portugal" off \
618
+      37 "Romania" off \
619
+      38 "Russia" off \
620
+      39 "Slovakia" off \
621
+      40 "Slovenia" off \
622
+      41 "Spain" off \
623
+      42 "Sweden" off \
624
+      43 "Switzerland" off \
625
+      44 "Taiwan" off \
626
+      45 "Thailand" off \
627
+      46 "Turkey" off \
628
+      47 "Ukraine" off \
629
+      48 "United Kingdom" off \
630
+      49 "United States" on 2> $data
631
+  sel=$?
632
+  case $sel in
633
+      1) exit 0;;
634
+      255) exit 0;;
635
+  esac
636
+  case $(cat $data) in
637
+      1) DEBIAN_REPO='ftp.au.debian.org';;
638
+      2) DEBIAN_REPO='ftp.at.debian.org';;
639
+      3) DEBIAN_REPO='ftp.by.debian.org';;
640
+      4) DEBIAN_REPO='ftp.be.debian.org';;
641
+      5) DEBIAN_REPO='ftp.ba.debian.org';;
642
+      6) DEBIAN_REPO='ftp.br.debian.org';;
643
+      7) DEBIAN_REPO='ftp.bg.debian.org';;
644
+      8) DEBIAN_REPO='ftp.ca.debian.org';;
645
+      9) DEBIAN_REPO='ftp.cl.debian.org';;
646
+      10) DEBIAN_REPO='ftp.cn.debian.org';;
647
+      11) DEBIAN_REPO='ftp.hr.debian.org';;
648
+      12) DEBIAN_REPO='ftp.cz.debian.org';;
649
+      13) DEBIAN_REPO='ftp.dk.debian.org';;
650
+      14) DEBIAN_REPO='ftp.sv.debian.org';;
651
+      15) DEBIAN_REPO='ftp.ee.debian.org';;
652
+      16) DEBIAN_REPO='ftp.fi.debian.org';;
653
+      17) DEBIAN_REPO='ftp2.fr.debian.org';;
654
+      18) DEBIAN_REPO='ftp.fr.debian.org';;
655
+      19) DEBIAN_REPO='ftp2.de.debian.org';;
656
+      20) DEBIAN_REPO='ftp.de.debian.org';;
657
+      21) DEBIAN_REPO='ftp.gr.debian.org';;
658
+      22) DEBIAN_REPO='ftp.hu.debian.org';;
659
+      23) DEBIAN_REPO='ftp.is.debian.org';;
660
+      24) DEBIAN_REPO='ftp.ir.debian.org';;
661
+      25) DEBIAN_REPO='ftp.ie.debian.org';;
662
+      26) DEBIAN_REPO='ftp.it.debian.org';;
663
+      27) DEBIAN_REPO='ftp.jp.debian.org';;
664
+      28) DEBIAN_REPO='ftp.kr.debian.org';;
665
+      29) DEBIAN_REPO='ftp.lt.debian.org';;
666
+      30) DEBIAN_REPO='ftp.mx.debian.org';;
667
+      31) DEBIAN_REPO='ftp.nl.debian.org';;
668
+      32) DEBIAN_REPO='ftp.nc.debian.org';;
669
+      33) DEBIAN_REPO='ftp.nz.debian.org';;
670
+      34) DEBIAN_REPO='ftp.no.debian.org';;
671
+      35) DEBIAN_REPO='ftp.pl.debian.org';;
672
+      36) DEBIAN_REPO='ftp.pt.debian.org';;
673
+      37) DEBIAN_REPO='ftp.ro.debian.org';;
674
+      38) DEBIAN_REPO='ftp.ru.debian.org';;
675
+      39) DEBIAN_REPO='ftp.sk.debian.org';;
676
+      40) DEBIAN_REPO='ftp.si.debian.org';;
677
+      41) DEBIAN_REPO='ftp.es.debian.org';;
678
+      42) DEBIAN_REPO='ftp.se.debian.org';;
679
+      43) DEBIAN_REPO='ftp.ch.debian.org';;
680
+      44) DEBIAN_REPO='ftp.tw.debian.org';;
681
+      45) DEBIAN_REPO='ftp.th.debian.org';;
682
+      46) DEBIAN_REPO='ftp.tr.debian.org';;
683
+      47) DEBIAN_REPO='ftp.ua.debian.org';;
684
+      48) DEBIAN_REPO='ftp.uk.debian.org';;
685
+      49) DEBIAN_REPO='ftp.us.debian.org';;
686
+      255) exit 0;;
687
+  esac
688
+  save_configuration_file
689
+
690
+  data=$(tempfile 2>/dev/null)
691
+  trap "rm -f $data" 0 1 2 5 15
692
+  dialog --backtitle "Freedombone Configuration" \
581 693
       --radiolist "Pick a domain name service (DNS):" 25 50 16 \
582 694
       1 "Digital Courage" on \
583 695
       2 "German Privacy Foundation 1" off \