diff --git a/bin/oref0-setup.sh b/bin/oref0-setup.sh index 119e83cc..90d5bde1 100755 --- a/bin/oref0-setup.sh +++ b/bin/oref0-setup.sh @@ -258,7 +258,7 @@ else (cd ~/src && git clone git://github.com/openaps/oref0.git) || die "Couldn't clone oref0" fi echo Checking oref0 installation -npm list -g oref0 | egrep oref0@0.3. || (echo Installing latest oref0 && sudo npm install -g oref0) +npm list -g oref0 | egrep oref0@0.3.[6-9] || (echo Installing latest oref0 && sudo npm install -g oref0) #(echo Installing latest oref0 dev && cd $HOME/src/oref0/ && npm run global-install) echo Checking mmeowlink installation @@ -322,20 +322,14 @@ elif [[ ${CGM,,} =~ "shareble" ]]; then (cd ~/src/Adafruit_Python_BluefruitLE && git fetch && git checkout wip/bewest/custom-gatt-profile && git pull) || die "Couldn't pull latest Adafruit_Python_BluefruitLE wip/bewest/custom-gatt-profile" else echo -n "Cloning Adafruit_Python_BluefruitLE wip/bewest/custom-gatt-profile: " + # TODO: get this moved over to openaps and install with pip (cd ~/src && git clone -b wip/bewest/custom-gatt-profile https://github.com/bewest/Adafruit_Python_BluefruitLE.git) || die "Couldn't clone Adafruit_Python_BluefruitLE wip/bewest/custom-gatt-profile" fi echo Installing Adafruit_BluefruitLE && cd $HOME/src/Adafruit_Python_BluefruitLE && sudo python setup.py develop || die "Couldn't install Adafruit_BluefruitLE" fi - if [ -d "$HOME/src/openxshareble/" ]; then - echo "$HOME/src/openxshareble/ already exists; pulling latest dev branch" - (cd ~/src/openxshareble && git fetch && git checkout dev && git pull) || die "Couldn't pull latest openxshareble dev" - else - echo -n "Cloning openxshareble dev: " - (cd ~/src && git clone -b dev https://github.com/openaps/openxshareble.git) || die "Couldn't clone openxshareble dev" - fi echo Checking openxshareble installation if ! python -c "import openxshareble" 2>/dev/null; then - echo Installing openxshareble && (cd $HOME/src/openxshareble && sudo python setup.py develop) || die "Couldn't install openxshareble" + echo Installing openxshareble && sudo pip install git+https://github.com/openaps/openxshareble.git@dev || die "Couldn't install openxshareble" fi sudo apt-get -y install bc jq libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev python-dbus || die "Couldn't apt-get install: run 'sudo apt-get update' and try again?" echo Checking bluez installation @@ -351,17 +345,6 @@ elif [[ ${CGM,,} =~ "shareble" ]]; then fi # comment out existing line if it exists and isn't already commented out sed -i"" 's/^screen -S "brcm_patchram_plus" -d -m \/usr\/local\/sbin\/bluetooth_patchram.sh/# &/' /etc/rc.local - echo Checking openaps dev installation - if ! openaps --version | egrep "0.[2-9].[0-9]"; then - if [ -d "$HOME/src/openaps/" ]; then - echo "$HOME/src/openaps/ already exists; pulling latest dev branch" - (cd ~/src/openaps && git fetch && git checkout dev && git pull) || die "Couldn't pull latest openaps dev" - else - echo -n "Cloning openaps dev: " - (cd ~/src && git clone -b dev git://github.com/openaps/openaps.git) || die "Couldn't clone openaps dev" - fi - echo Installing latest openaps dev && (cd $HOME/src/openaps/ && sudo python setup.py develop) || die "Couldn't install openaps" - fi mkdir -p $directory-cgm-loop if ( cd $directory-cgm-loop && git status 2>/dev/null >/dev/null && openaps use -h >/dev/null ); then @@ -411,14 +394,7 @@ killall -g openaps 2>/dev/null; openaps device remove pump 2>/dev/null if [[ "$ttyport" =~ "spi" ]]; then echo Checking spi_serial installation if ! python -c "import spi_serial" 2>/dev/null; then - if [ -d "$HOME/src/915MHzEdisonExplorer_SW/" ]; then - echo "$HOME/src/915MHzEdisonExplorer_SW/ already exists; pulling latest master branch" - (cd ~/src/915MHzEdisonExplorer_SW && git fetch && git checkout master && git pull) || die "Couldn't pull latest 915MHzEdisonExplorer_SW master" - else - echo -n "Cloning 915MHzEdisonExplorer_SW master: " - (cd ~/src && git clone -b master https://github.com/EnhancedRadioDevices/915MHzEdisonExplorer_SW.git) || die "Couldn't clone 915MHzEdisonExplorer_SW master" - fi - echo Installing spi_serial && cd $HOME/src/915MHzEdisonExplorer_SW/spi_serial && sudo pip install -e . || die "Couldn't install spi_serial" + echo Installing spi_serial && sudo pip install git+https://github.com/EnhancedRadioDevices/915MHzEdisonExplorer_SW.git@master || die "Couldn't install spi_serial" fi echo Checking mraa installation @@ -440,6 +416,11 @@ if [[ "$ttyport" =~ "spi" ]]; then fi +echo Checking openaps dev installation +if ! openaps --version 2>&1 | egrep "0.[2-9].[0-9]"; then + echo Installing latest openaps dev && sudo pip install git+https://github.com/openaps/openaps.git@dev || die "Couldn't install openaps" +fi + cd $directory || die "Can't cd $directory" if [[ -z "$ttyport" ]]; then openaps device add pump medtronic $serial || die "Can't add pump" diff --git a/package.json b/package.json index b903b02d..09645404 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oref0", - "version": "0.3.5-dev", + "version": "0.3.6-dev", "description": "openaps oref0 reference implementation of the reference design", "scripts": { "test": "make test",