@@ -7,6 +7,16 @@ if [ ! $(id -u) = 0 ]; then
7
7
fi
8
8
9
9
LOGFILE=" ./install.log"
10
+ ASSUMEYES=0
11
+
12
+ for arg in " $@ " ; do
13
+ shift
14
+ case " $arg " in
15
+ --assume-yes ) ASSUMEYES=1; shift ;;
16
+ -- ) shift ; break ;;
17
+ * ) break ;;
18
+ esac
19
+ done
10
20
11
21
DISTRO=" unknown"
12
22
DISTRO_CODENAME=" unknown"
@@ -15,32 +25,36 @@ if which lsb_release >/dev/null; then
15
25
DISTRO_CODENAME=" $( lsb_release -cs ) "
16
26
fi
17
27
18
- if [ $DISTRO_CODENAME != " trusty " ] ; then
19
- echo " !!!!!!!!!!!! WARNING !!!!!!!!!!!! "
20
- echo " You are attempting to install Tor2web on an unsupported platform. "
21
- echo " Supported platform is Ubuntu Trusty (14.04) "
22
-
23
- while true ; do
24
- read -p " Do you wish to continue anyhow? [y|n]? " yn
25
- case $yn in
26
- [Yy ]* ) break ;;
27
- [Nn] * ) echo " Installation aborted ." ; exit ;;
28
- * ) echo $yn ; echo " Please answer y/n. " ; continue ;;
29
- esac
30
- done
28
+ if echo " $DISTRO_CODENAME " | grep -vqE " ^xenial$ " ; then
29
+ echo " WARNING: GlobaLeaks is supported and tested only on Ubuntu Xenial (16.04) "
30
+
31
+ if [ $ASSUMEYES -eq 0 ] ; then
32
+ while true ; do
33
+ read -p " Do you wish to continue anyway? [y|n]? " yn
34
+ case $yn in
35
+ [Yy] * ) break ;;
36
+ [Nn ]* ) exit 1 ;;
37
+ * ) echo $yn ; echo " Please answer y/n ." ; continue ;;
38
+ esac
39
+ done
40
+ fi
31
41
fi
32
42
33
43
echo " Performing Tor2web installation on $DISTRO - $DISTRO_CODENAME "
34
44
35
- if [ $DISTRO_CODENAME != " trusty" ]; then
36
- # In case of unsupported platforms we fallback on trusty
37
- echo " Given that the platform is not supported the install script will use trusty repository."
38
- echo " In case of failure refer to the wiki for manual setup possibilities."
39
- echo " Tor2web Wiki Address: https://github.com/globaleaks/Tor2web/wiki"
40
-
41
- # Given the fact that the platform is not supported be try as it is an Ubuntu 14.04
45
+ # The supported platforms are experimentally more than only Ubuntu as
46
+ # publicly communicated to users.
47
+ #
48
+ # Depending on the intention of the user to proceed anyhow installing on
49
+ # a not supported distro we using the experimental package if it exists
50
+ # or xenial as fallback.
51
+ if echo " $DISTRO_CODENAME " | grep -vqE " ^(trusty|xenial|wheezy|jessie)$" ; then
52
+ # In case of unsupported platforms we fallback on Xenial
53
+ echo " No packages available for the current distribution; the install script will use the Xenial repository."
54
+ echo " In case of a failure refer to the wiki for manual setup possibilities."
55
+ echo " GlobaLeaks wiki: https://github.com/globaleaks/GlobaLeaks/wiki"
42
56
DISTRO=" Ubuntu"
43
- DISTRO_CODENAME=" trusty "
57
+ DISTRO_CODENAME=" xenial "
44
58
fi
45
59
46
60
DO () {
0 commit comments