tor-browser 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. APP=tor-browser
  3. # CREATE THE DIRECTORY
  4. mkdir -p /opt/"$APP"
  5. cd /opt/"$APP"
  6. # ADD THE REMOVER
  7. echo '#!/bin/sh' >> /opt/"$APP"/remove
  8. echo "rm -R -f /usr/local/share/applications/$APP-AM.desktop /opt/$APP /usr/local/bin/$APP" >> /opt/"$APP"/remove
  9. chmod a+x /opt/"$APP"/remove
  10. # DOWNLOAD THE ARCHIVE
  11. mkdir -p tmp
  12. cd ./tmp
  13. wget "$(curl -Ls https://www.torproject.org/download/languages/ | tr '><" ' '\n' | grep "linux.*i686.*tar.xz$" | head -1)"
  14. [ -e ./*tar.* ] && tar fx ./*tar.* && rm -f ./*tar.*
  15. cd ..
  16. mv ./tmp/*/Browser/* ./
  17. rm -R ./tmp
  18. # LINK / SCRIPT IN $PATH
  19. ln -s /opt/"$APP"/firefox.real /usr/local/bin/"$APP"
  20. # LAUNCHER
  21. echo "
  22. [Desktop Entry]
  23. Type=Application
  24. Name=Tor Browser
  25. GenericName=Web Browser
  26. Comment=Tor Browser is +1 for privacy and −1 for mass surveillance
  27. Categories=Network;WebBrowser;Security;
  28. Exec=$APP
  29. X-TorBrowser-ExecShell=/opt/$APP/start-tor-browser --detach
  30. Icon=/opt/$APP/browser/chrome/icons/default/default128.png
  31. StartupWMClass=Tor Browser" > /usr/local/share/applications/"$APP"-AM.desktop