Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/openaps-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ if ! nodejs --version | grep -e 'v8\.' -e 'v1[02468]\.' &> /dev/null ; then
# nodesource doesn't support armv6
if ! arch | grep -e 'armv6' &> /dev/null ; then
sudo bash -c "curl -sL https://deb.nodesource.com/setup_8.x | bash -" || die "Couldn't setup node 8"
sudo apt-get install -y nodejs || die "Couldn't install nodejs"
sudo apt-get install -y nodejs=8.* || die "Couldn't install nodejs"
else
sudo apt-get install -y nodejs npm || die "Couldn't install nodejs and npm"
npm install npm@latest -g || die "Couldn't update npm"
Expand Down
15 changes: 6 additions & 9 deletions bin/oref0-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -684,11 +684,11 @@ if prompt_yn "" N; then

# install/upgrade to latest node 8 if neither node 8 nor node 10+ LTS are installed
if ! nodejs --version | grep -e 'v8\.' -e 'v1[02468]\.' ; then
echo Upgrading to node 8
echo Installing node 8
# Use nodesource setup script to add nodesource repository to sources.list.d
sudo bash -c "curl -sL https://deb.nodesource.com/setup_8.x | bash -" || die "Couldn't setup node 8"
# Install nodejs and npm from nodesource
sudo apt-get install -y nodejs || die "Couldn't install nodejs"
sudo apt-get install -y nodejs=8.* || die "Couldn't install nodejs"
fi

# Attempting to remove git to make install --nogit by default for existing users
Expand Down Expand Up @@ -807,6 +807,7 @@ if prompt_yn "" N; then
set_pref_string .myopenaps_path "$directory"
set_pref_string .pump_serial "$serial"
set_pref_string .radio_locale "$radio_locale"
set_pref_string .hardwaretype "$hardwaretype"
if [[ ! -z "$BT_PEB" ]]; then
set_pref_string .bt_peb "$BT_PEB"
fi
Expand Down Expand Up @@ -1258,18 +1259,14 @@ if prompt_yn "" N; then
echo "Make and install pi-buttons..."
cd pi-buttons
cd src && make && sudo make install && sudo make install_service
# Radiofruit buttons are on different GPIOs than the Explorer HAT
if [[ "$hardwaretype" =~ "radiofruit" ]]; then
sed -i 's/17,27/5,6/g' /etc/pi-buttons.conf
fi
systemctl enable pi-buttons && systemctl restart pi-buttons
echo "Installing openaps-menu..."
if [[ "$hardwaretype" =~ "radiofruit" ]]; then
#Once we have a radiofruit branch in openaps-menu, we can change the repo...
cd $HOME/src && git clone git://github.com/cluckj/openaps-menu.git && git checkout radiofruit || (cd openaps-menu && git checkout radiofruit && git pull)
else
cd $HOME/src && git clone git://github.com/openaps/openaps-menu.git || (cd openaps-menu && git checkout master && git pull)
fi
cd $HOME/src/openaps-menu && sudo npm install
cd $HOME/src && git clone git://github.com/openaps/openaps-menu.git || (cd openaps-menu && git checkout master && git pull)
cd $HOME/src/openaps-menu && sudo npm install
cp $HOME/src/openaps-menu/openaps-menu.service /etc/systemd/system/ && systemctl enable openaps-menu
fi

Expand Down