Skip to content

Instantly share code, notes, and snippets.

  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rposbo/9971920 to your computer and use it in GitHub Desktop.
echo "******************************************************************************"
echo "Don't go anywhere - I'm going to need your input shortly.."
read -p "[Enter to continue]"
### Set up dependencies
# Configure sources & repos
echo "** Updating apt-get"
sudo apt-get update -y > /dev/null
echo "** Installing prerequisites"
sudo apt-get install libexpat1-dev libicu-dev git build-essential curl software-properties-common python-software-properties -y > /dev/null
### deal with intereactive stuff first
## needs someone to hit "enter"
echo "** Adding a new repo ref - hit Enter"
sudo add-apt-repository ppa:webupd8team/sublime-text-2
echo "** Creating a new user; enter some details"
## needs someone to enter user details
sudo adduser developer
echo "******************************************************************************"
echo "OK! All done, now it's the unattended stuff. Go make coffee. Bring me one too."
read -p "[Enter to continue]"
### Now the unattended stuff can kick off
# For mongo db -
echo "** More prerequisites for mongo and chrome"
sudo apt-key adv --keyserver hkp:// --recv 7F0CEB10 > /dev/null
sudo sh -c 'echo "deb dist 10gen" | sudo tee /etc/apt/sources.list.d/mongodb.list' > /dev/null
# For chrome -
wget -q -O - | sudo apt-key add -
echo "** Updating apt-get again"
sudo apt-get update -y > /dev/null
## Go, go, gadget installations!
# chrome
echo "** Installing Chrome"
sudo apt-get install google-chrome-stable -y > /dev/null
# sublime-text
echo "** Installing sublimetext"
sudo apt-get install sublime-text -y > /dev/null
# mongo-db
echo "** Installing mongodb"
sudo apt-get install mongodb-10gen -y > /dev/null
# desktop!
echo "** Installing ubuntu-desktop"
sudo apt-get install ubuntu-desktop -y > /dev/null
# node - the right(?) way!
echo "** Installing node"
echo 'export "PATH=$HOME/local/bin:$PATH"' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install
# other node goodies
sudo npm install nodemon > /dev/null
sudo npm install mocha > /dev/null
## shutdown message (need to start from VBox now we have a desktop env)
echo "******************************************************************************"
echo "**** All good - now quitting. Run *vagrant halt* then restart from VBox to go to desktop ****"
read -p "[Enter to shutdown]"
sudo shutdown 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment