old_debian.sh 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. #!/bin/bash
  2. # On Trisquel 7
  3. CURR_DIR=$(pwd)
  4. EMACS_VERSION=26.2
  5. if [ ! -d ~/Downloads ]; then
  6. mkdir ~/Downloads
  7. fi
  8. sudo apt-get -y remove emacs24
  9. sudo apt-get -y install build-essential gdb libssl-dev clang devscripts mpd mpg321 music123 vlc
  10. sudo apt-get -y install curl wget libgnutls28-dev gnutls-bin qt5-default shellcheck
  11. sudo apt-get -y install tor info libdbus-1-dev
  12. sudo apt-get -y install libgtk-3-dev libjpeg-dev libxpm-dev libgif-dev libtiff5-dev
  13. sudo apt-get -y install libncurses5-dev texinfo
  14. echo 'N' | sudo apt-get -yq -t stretch-backports install tor
  15. systemctl restart tor
  16. sudo apt-get -y install keepassx android-tools* gnuplot libsqlite3-dev graphviz xdot calibre
  17. sudo apt-get build-dep emacs24
  18. sudo apt-get install busybox
  19. sudo apt-get install --reinstall cryptsetup
  20. #su -c 'echo "deb ftp://ftp.gajim.org/debian unstable main" > /etc/apt/sources.list.d/gajim.list'
  21. #sudo apt-get update
  22. #sudo apt-get -y install gajim-dev-keyring
  23. #sudo apt-get -y install python-dev python-pip gajim-nightly
  24. #mkdir ~/.local/share/gajim/plugins -p
  25. #cd ~/.local/share/gajim/plugins || exit 35467835
  26. #git clone https://github.com/omemo/gajim-omemo
  27. #sudo pip install python-axolotl==0.1.35
  28. #sudo pip install cryptography
  29. #sudo pip install protobuf==2.6.1
  30. cd ~/Downloads || exit 364836585
  31. if [ ! -f emacs-${EMACS_VERSION}.tar.gz ]; then
  32. wget http://ftp.gnu.org/gnu/emacs/emacs-${EMACS_VERSION}.tar.gz
  33. fi
  34. hashval=$(sha256sum emacs-${EMACS_VERSION}.tar.gz | awk -F ' ' '{print $1}')
  35. if [[ "$hashval" != "4f99e52a38a737556932cc57479e85c305a37a8038aaceb5156625caf102b4eb" ]]; then
  36. echo "Incorrect hash $hashval"
  37. rm emacs-${EMACS_VERSION}.tar.gz
  38. exit 7892363
  39. fi
  40. tar -xzvf emacs-${EMACS_VERSION}.tar.gz
  41. cd emacs-${EMACS_VERSION} || exit 2468426
  42. ./autogen.sh
  43. ./configure --with-gnutls=no
  44. make bootstrap
  45. make
  46. sudo make install
  47. if [ ! -f /usr/local/bin/emacs ]; then
  48. echo 'Emacs was not installed'
  49. exit 78352
  50. fi
  51. cp /usr/local/bin/emacs /usr/bin/emacs
  52. echo '[Desktop Entry]' > /tmp/Emacs.desktop
  53. echo 'Version=1.0' >> /tmp/Emacs.desktop
  54. echo 'Name=Emacs-24' >> /tmp/Emacs.desktop
  55. echo "Exec=env UBUNTU_MENUPROXY=0 /usr/local/bin/emacs-$EMACS_VERSION" >> /tmp/Emacs.desktop
  56. echo 'Terminal=false' >> /tmp/Emacs.desktop
  57. echo 'Icon=emacs' >> /tmp/Emacs.desktop
  58. echo 'Type=Application' >> /tmp/Emacs.desktop
  59. echo 'Categories=IDE' >> /tmp/Emacs.desktop
  60. echo 'X-Ayatana-Desktop-Shortcuts=NewWindow' >> /tmp/Emacs.desktop
  61. echo '[NewWindow Shortcut Group]' >> /tmp/Emacs.desktop
  62. echo 'Name=New Window' >> /tmp/Emacs.desktop
  63. echo 'TargetEnvironment=Unity' >> /tmp/Emacs.desktop
  64. sudo mv /tmp/Emacs.desktop /usr/share/applications/Emacs.desktop
  65. # Install git
  66. GIT_VERSION=2.19.1
  67. sudo apt-get -y install build-essential libssl-dev libcurl4-gnutls-dev libexpat1-dev gettext unzip
  68. if [ -f git.zip ]; then
  69. rm git.zip
  70. fi
  71. cd ~/Downloads || exit 246824
  72. wget https://github.com/git/git/archive/v$GIT_VERSION.zip -O git.zip
  73. if [ -f git.zip ]; then
  74. sudo apt-get -y remove git libcurl4-openssl-dev
  75. unzip git.zip
  76. cd git-${GIT_VERSION} || exit 3568356
  77. make prefix=/usr/local all
  78. sudo make prefix=/usr/local install
  79. sudo cp /usr/local/bin/git /usr/bin/git
  80. fi
  81. cd "$CURR_DIR" || exit 356835
  82. cd ..
  83. ./install.sh
  84. git config --global core.editor emacs
  85. exit 0