prerequisites.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. RETCODE=$(fw_exists fwbm_prereqs_installed)
  3. [ ! "$RETCODE" == 0 ] || { \
  4. echo "Prerequisites installed!";
  5. return 0;
  6. }
  7. sudo apt-get -y update
  8. sudo apt-get -y upgrade
  9. # WARNING: DONT PUT A SPACE AFTER ANY BACKSLASH OR APT WILL BREAK
  10. sudo apt-get -y install \
  11. cmake build-essential automake `# Needed for building code` \
  12. curl wget unzip `# Common tools` \
  13. software-properties-common `# Needed for add-apt-repository` \
  14. git-core mercurial `# Version control systems` \
  15. libpcre3 libpcre3-dev libpcrecpp0 `# Regular expression support` \
  16. libssl-dev libcurl4-openssl-dev `# SSL libraries` \
  17. libmysqlclient-dev \
  18. mongodb-clients \
  19. libsqlite3-dev sqlite3 `# Database libraries` \
  20. zlib1g-dev python-software-properties \
  21. libreadline6-dev \
  22. libbz2-dev \
  23. libyaml-dev libxml2-dev \
  24. libxslt-dev libgdbm-dev ncurses-dev \
  25. libffi-dev htop libtool bison libevent-dev \
  26. libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \
  27. liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev \
  28. libjson0-dev libmcrypt-dev libicu-dev gettext \
  29. libpq-dev mlton cloc
  30. sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  31. sudo apt-get -y update
  32. sudo apt-get install -y gcc-4.8 g++-4.8
  33. # Stop permanently overwriting people's files just for
  34. # trying out our software!
  35. RETCODE=$(fw_exists ~/.bash_profile.bak)
  36. [ ! "$RETCODE" == 0 ] || { \
  37. echo "Backing up your original ~/.bash_profile, ~/.profile, ~/.bashrc"
  38. mv ~/.bash_profile ~/.bash_profile.bak || true
  39. mv ~/.profile ~/.profile.bak || true
  40. mv ~/.bashrc ~/.bashrc.bak || true
  41. }
  42. sudo sh -c "echo '* - nofile 65535' >> /etc/security/limits.conf"
  43. touch fwbm_prereqs_installed