Skip to content

Commit

Permalink
Merge pull request #1 from quinkennedy/install_script
Browse files Browse the repository at this point in the history
Install script
  • Loading branch information
jmwohl committed Nov 17, 2015
2 parents 2402436 + 03e15b3 commit 15a964f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
13 changes: 13 additions & 0 deletions launch.sh
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 "$@"
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

# 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"

0 comments on commit 15a964f

Please sign in to comment.