File tree Expand file tree Collapse file tree 2 files changed +44
-0
lines changed Expand file tree Collapse file tree 2 files changed +44
-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
+ cd $DIR
7
+ # for some reason, even if `nvm` worked in the console
8
+ # this script would error with `nvm command not found`
9
+ source $NVM_DIR /nvm.sh
10
+ # activate appropriate Nodejs version
11
+ nvm use 5.0.0
12
+ # launch openframe!
13
+ node frame.js " $@ "
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
+
19
+ # install chromium from package repository
20
+ sudo apt-get update
21
+ sudo apt-get install chromium
22
+
23
+ # now install Nodejs dependencies
24
+ cd $DIR
25
+ cd ..
26
+ npm install
27
+
28
+ echo " "
29
+ echo " You must restart your shell, or run the following command: source ~/.bashrc"
30
+ echo " After reloading .bashrc, you can launch the frame with: $DIR /../launch.sh -u [USERNAME] -f [FRAME_NAME] -d [DOMAIN]"
31
+ echo " For example: $DIR /../launch.sh -u jonwohl -f Home -d openframe.io"
You can’t perform that action at this time.
0 commit comments