Skip to content

Commit 15a964f

Browse files
committed
Merge pull request #1 from quinkennedy/install_script
Install script
2 parents 2402436 + 03e15b3 commit 15a964f

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

launch.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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 "$@"

scripts/install.sh

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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"

0 commit comments

Comments
 (0)