prerequisites.sh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. sudo apt-get -y install build-essential \
  10. libpcre3 libpcre3-dev libpcrecpp0 \
  11. libssl-dev zlib1g-dev python-software-properties \
  12. unzip git-core libcurl4-openssl-dev libbz2-dev \
  13. libmysqlclient-dev mongodb-clients libreadline6-dev \
  14. libyaml-dev libsqlite3-dev sqlite3 libxml2-dev \
  15. libxslt-dev libgdbm-dev ncurses-dev automake \
  16. libffi-dev htop libtool bison libevent-dev \
  17. libgstreamer-plugins-base0.10-0 libgstreamer0.10-0 \
  18. liborc-0.4-0 libwxbase2.8-0 libwxgtk2.8-0 libgnutls-dev \
  19. libjson0-dev libmcrypt-dev libicu-dev cmake gettext \
  20. curl libpq-dev mercurial mlton cloc wget
  21. sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  22. sudo apt-get -y update
  23. sudo apt-get install -y gcc-4.8 g++-4.8
  24. # Stop permanently overwriting people's files just for
  25. # trying out our software!
  26. RETCODE=$(fw_exists ~/.bash_profile.bak)
  27. [ ! "$RETCODE" == 0 ] || { \
  28. echo "Backing up your original ~/.bash_profile, ~/.profile, ~/.bashrc"
  29. mv ~/.bash_profile ~/.bash_profile.bak || true
  30. mv ~/.profile ~/.profile.bak || true
  31. mv ~/.bashrc ~/.bashrc.bak || true
  32. }
  33. cp ../config/benchmark_profile ~/.bash_profile
  34. cat ../config/benchmark_profile >> ~/.profile
  35. cat ../config/benchmark_profile >> ~/.bashrc
  36. sudo sh -c "echo '* - nofile 65535' >> /etc/security/limits.conf"
  37. touch fwbm_prereqs_installed