Skip to content

Commit

Permalink
Created installation script
Browse files Browse the repository at this point in the history
Using NVM for node version management
Not completetly automated since it requires
 reloading the shell afterward to propogate
 environment variables
  • Loading branch information
quinkennedy committed Nov 11, 2015
1 parent 2402436 commit 77cf107
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env bash

# get this script's directory
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

# elevate to root
echo ""
sudo -v -p "Please enter the administrator's password: "

# install NVM for easy node version management
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | sh
# source nvm to access it in the shell
# usually it is source in .bashrc,
# but we can't reload .bashrc within a script
source ~/.nvm/nvm.sh
# install latest tested stable Nodejs
nvm install 5.0.0
# set 5.0.0 as default system Nodejs version
# this means 5.0.0 will be in the $PATH when you boot
nvm alias default 5.0.0

# install chromium from package repository
sudo apt-get update
sudo apt-get install chromium

# now install Nodejs dependencies
cd $DIR
cd ..
npm install

echo "You must restart your shell, or run the following command: source ~/.bashrc"

0 comments on commit 77cf107

Please sign in to comment.