commit d80f269f62fd8d6bd4cefc28f81b774b0312109b Author: fh fh-github@fholzhauer.de Date: Thu Jul 25 17:52:42 2013 +0200
back to upstream master --- setup-dependencies.sh | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-)
diff --git a/setup-dependencies.sh b/setup-dependencies.sh index cdbd0f0..c4f356f 100644 --- a/setup-dependencies.sh +++ b/setup-dependencies.sh @@ -1,19 +1,16 @@ #!/bin/bash -trap 'sudo -k && exit 1' INT
# Discover our Distro release RELEASE="`lsb_release -c|cut -f 2`"; -TOR_DEB_REPO="http://deb.torproject.org/torproject.org"; +TOR_DEB_REPO="deb.torproject.org/torproject.org";
-case $RELEASE in - natty|wheezy|squeeze|precise) - - echo "sudo is annoying, tell us your password once and sudo won't annoy you for the rest of this process..."; - sudo echo "if you read this, we won't ask for your password again during this process unless something goes wrong"; +echo "sudo is annoying, tell us your password once and sudo won't annoy you for the rest of this process..."; +sudo echo "if you read this, we won't ask for your password again during this process unless something goes wrong";
+# This is for Ubuntu's natty +if [ $RELEASE = "natty" ] || [ $RELEASE = "wheezy" ]; then # Add Tor repo HAVE_GPG_KEY="`sudo apt-key finger|grep 'A3C4 F0F9 79CA A22C DBA8 F512 EE8C BC9E 886D DD89'|head -n 1`"; - echo "Checking for torproject.org Debian repository key..." if [ -z "$HAVE_GPG_KEY" ]; then echo "It appears that you do not have the torproject.org Debian repository key installed; installing it..."; cat apt.key | sudo apt-key add -; @@ -24,11 +21,7 @@ case $RELEASE in HAVE_TOR_REPO="`grep deb.torproject.org/torproject.org /etc/apt/sources.list /etc/apt/sources.list.d/* 2>&1|grep torproject|head -n 1`"; if [ -z "$HAVE_TOR_REPO" ]; then echo "It appears that you do not have the torproject.org Debian repository installed; installing it..."; - if [ $RELEASE = "squeeze" ]; then - (echo -e "deb $TOR_DEB_REPO $RELEASE main\ndeb-src $TOR_DEB_REPO $RELEASE main" | sudo tee -a /etc/apt/sources.list) > /dev/null - else - sudo apt-add-repository "deb $TOR_DEB_REPO $RELEASE main" - fi + sudo apt-add-repository "deb $TOR_DEB_REPO $RELEASE main"; else echo "It appears that you have the torproject.org Debian repository installed!"; fi @@ -41,7 +34,7 @@ case $RELEASE in
if [ ! -f ~/.virtualenvs/ooniprobe/bin/activate ]; then # Set up the virtual environment - mkdir -p ~/.virtualenvs + mkdir ~/.virtualenvs/ virtualenv ~/.virtualenvs/ooniprobe source ~/.virtualenvs/ooniprobe/bin/activate else @@ -81,9 +74,10 @@ case $RELEASE in echo " fi"; echo ;
- ;; -*) +else + echo "It appears that you are using an unsupported OS - please tell us"; echo "by filing a bug: https://trac.torproject.org/projects/tor/newticket"; - ;; -esac + +fi +
tor-commits@lists.torproject.org