install_other_browsers.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. $su apt-get -y --fix-missing install surf
  11. #$su apt-get -y --fix-missing install qutebrowser
  12. # badwolf
  13. mkdir -p ~/src
  14. cd ~/src || return
  15. if [ ! -d badwolf ]; then
  16. git clone https://hacktivis.me/git/badwolf.git
  17. cd badwolf || return
  18. else
  19. cd badwolf || return
  20. git pull
  21. fi
  22. ./configure
  23. make
  24. $su make install
  25. # tor browser
  26. #https://www.torproject.org/download/
  27. mkdir -p ~/bin
  28. cd ~/bin || return
  29. export TOR_BROWSER_VERSION=$(curl --silent "https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=tor-browser" | grep "pkgver=" | sed 's/pkgver=//' | sed "s/'//g")
  30. export TOR_BROWSER_FILENAME="tor-browser-linux64-${TOR_BROWSER_VERSION}_en-US.tar.xz"
  31. export TOR_BROWSER_DOWNLOAD_URL="https://www.torproject.org/dist/torbrowser/${TOR_BROWSER_VERSION}/${TOR_BROWSER_FILENAME}"
  32. $su apt-get update -qq
  33. $su apt-get install -qq -y curl
  34. # Remove previous file
  35. rm -rf tor-browser-linux64-*_en-US.tar.xz
  36. # Download new version
  37. curl -OL "${TOR_BROWSER_DOWNLOAD_URL}"
  38. # Remove previous directory
  39. rm -rf tor-browser_en-US
  40. # Remove previous symlink
  41. rm -f tor-browser
  42. # Extract new version
  43. tar -xvf ${TOR_BROWSER_FILENAME}
  44. # Create new symlink
  45. ln -s ~/bin/tor-browser_en-US/Browser/start-tor-browser ~/bin/tor-browser