File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # get this script's directory
4
+ DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
5
+
6
+ # elevate to root
7
+ echo " "
8
+ sudo -v -p " Please enter the administrator's password: "
9
+
10
+ # install NVM for easy node version management
11
+ curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | sh
12
+ # source nvm to access it in the shell
13
+ # usually it is source in .bashrc,
14
+ # but we can't reload .bashrc within a script
15
+ source ~ /.nvm/nvm.sh
16
+ # install latest tested stable Nodejs
17
+ nvm install 5.0.0
18
+ # set 5.0.0 as default system Nodejs version
19
+ # this means 5.0.0 will be in the $PATH when you boot
20
+ nvm alias default 5.0.0
21
+
22
+ # install chromium from package repository
23
+ sudo apt-get update
24
+ sudo apt-get install chromium
25
+
26
+ # now install Nodejs dependencies
27
+ cd $DIR
28
+ cd ..
29
+ npm install
30
+
31
+ echo " You must restart your shell, or run the following command: source ~/.bashrc"
You can’t perform that action at this time.
0 commit comments