-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from quinkennedy/install_script
Install script
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# get this script's directory | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
cd $DIR | ||
# for some reason, even if `nvm` worked in the console | ||
# this script would error with `nvm command not found` | ||
source $NVM_DIR/nvm.sh | ||
# activate appropriate Nodejs version | ||
nvm use 5.0.0 | ||
# launch openframe! | ||
node frame.js "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
# install chromium from package repository | ||
sudo apt-get update | ||
sudo apt-get install chromium | ||
|
||
# now install Nodejs dependencies | ||
cd $DIR | ||
cd .. | ||
npm install | ||
|
||
echo "" | ||
echo "You must restart your shell, or run the following command: source ~/.bashrc" | ||
echo "After reloading .bashrc, you can launch the frame with: $DIR/../launch.sh -u [USERNAME] -f [FRAME_NAME] -d [DOMAIN]" | ||
echo "For example: $DIR/../launch.sh -u jonwohl -f Home -d openframe.io" |