Skip to content

Commit

Permalink
build: Install missing dependencies
Browse files Browse the repository at this point in the history
This has been tested in docker's debian:stable image

Also removing hardcoded Pi user as it could support other id (even root),
or other target device.

Bug: WebThingsIO#1206
Change-Id: I537ad8c8c3a3b4af161b61a7968073f4d3b7cee1
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
  • Loading branch information
rzr committed Jul 23, 2018
1 parent b47dc34 commit 638dc1a
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,30 @@
NVM_VERSION="v0.33.8"
NODE_VERSION="--lts=carbon"

cd /home/pi
[ "$USER" != "" ] || USER="pi"
[ "$HOME" != "" ] || HOME="/home/${USER}"
cd "${HOME}"

# Update the base packages that come with the system. This is required
# so that we can install git

sudo apt update
sudo apt upgrade -y
sudo apt install git -y
sudo apt install -y \
build-essential \
curl \
git \
libcap2-bin \
python \
#eol

mkdir -p mozilla-iot
cd mozilla-iot

# Install and configure nvm
curl -o- https://github.com/raw/creationix/nvm/${NVM_VERSION}/install.sh | bash
# The following 2 lines are installed into ~/.bashrc by the above,
# but on the RPi, sourcing ~/.bashrc winds up being a no-op (when sourced
# but on the target, sourcing ~/.bashrc winds up being a no-op (when sourced
# from a script), so we just run it here.
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" # This loads nvm
Expand Down

0 comments on commit 638dc1a

Please sign in to comment.