Skip to content

Commit 706ffee

Browse files
cluckjscottleibrand
authored andcommitted
Debian Buster compatibility (#1275)
* Save hardwaretype in preferences.json Store hardwaretype so that it can be used elsewhere. * Install node v8 Make sure nodesource repo is used to install nodejs and npm. * Install node v8 Make sure nodesource repo is used to install nodejs and npm, except on armv6... * Switch Radiofruit openaps-menu back to main repo
1 parent d45140a commit 706ffee

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

bin/openaps-packages.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if ! nodejs --version | grep -e 'v8\.' -e 'v1[02468]\.' &> /dev/null ; then
2424
# nodesource doesn't support armv6
2525
if ! arch | grep -e 'armv6' &> /dev/null ; then
2626
sudo bash -c "curl -sL https://deb.nodesource.com/setup_8.x | bash -" || die "Couldn't setup node 8"
27-
sudo apt-get install -y nodejs || die "Couldn't install nodejs"
27+
sudo apt-get install -y nodejs=8.* || die "Couldn't install nodejs"
2828
else
2929
sudo apt-get install -y nodejs npm || die "Couldn't install nodejs and npm"
3030
npm install npm@latest -g || die "Couldn't update npm"

bin/oref0-setup.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -684,11 +684,11 @@ if prompt_yn "" N; then
684684

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

694694
# Attempting to remove git to make install --nogit by default for existing users
@@ -807,6 +807,7 @@ if prompt_yn "" N; then
807807
set_pref_string .myopenaps_path "$directory"
808808
set_pref_string .pump_serial "$serial"
809809
set_pref_string .radio_locale "$radio_locale"
810+
set_pref_string .hardwaretype "$hardwaretype"
810811
if [[ ! -z "$BT_PEB" ]]; then
811812
set_pref_string .bt_peb "$BT_PEB"
812813
fi
@@ -1258,18 +1259,14 @@ if prompt_yn "" N; then
12581259
echo "Make and install pi-buttons..."
12591260
cd pi-buttons
12601261
cd src && make && sudo make install && sudo make install_service
1262+
# Radiofruit buttons are on different GPIOs than the Explorer HAT
12611263
if [[ "$hardwaretype" =~ "radiofruit" ]]; then
12621264
sed -i 's/17,27/5,6/g' /etc/pi-buttons.conf
12631265
fi
12641266
systemctl enable pi-buttons && systemctl restart pi-buttons
12651267
echo "Installing openaps-menu..."
1266-
if [[ "$hardwaretype" =~ "radiofruit" ]]; then
1267-
#Once we have a radiofruit branch in openaps-menu, we can change the repo...
1268-
cd $HOME/src && git clone git://github.com/cluckj/openaps-menu.git && git checkout radiofruit || (cd openaps-menu && git checkout radiofruit && git pull)
1269-
else
1270-
cd $HOME/src && git clone git://github.com/openaps/openaps-menu.git || (cd openaps-menu && git checkout master && git pull)
1271-
fi
1272-
cd $HOME/src/openaps-menu && sudo npm install
1268+
cd $HOME/src && git clone git://github.com/openaps/openaps-menu.git || (cd openaps-menu && git checkout master && git pull)
1269+
cd $HOME/src/openaps-menu && sudo npm install
12731270
cp $HOME/src/openaps-menu/openaps-menu.service /etc/systemd/system/ && systemctl enable openaps-menu
12741271
fi
12751272

0 commit comments

Comments
 (0)