Skip to content

Commit

Permalink
Keep value of BLYNK_JAR after self-update
Browse files Browse the repository at this point in the history
  • Loading branch information
Booteille committed May 18, 2017
1 parent 836e1cf commit c04e216
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,14 @@ if [[ "${BASH_SOURCE[0]}" = "$0" ]]; then
warning "No update available."
else
info "New version available. Updating to $version"
jar=$(sed -n -e '/^BLYNK_JAR/p' /usr/bin/blynkcli | cut -d \" -f2 )

sudo wget -c -q --show-progress "$latest" -O /tmp/blynkcli
sudo mv /tmp/blynkcli $BLYNKCLI_EXECUTABLE
sudo chmod +x $BLYNKCLI_EXECUTABLE

sudo sed -i -e "s#^BLYNK_JAR=\".*\"#BLYNK_JAR=\"$jar\"#" $BLYNKCLI_EXECUTABLE

info "Update complete."
fi
elif [[ $1 == "version" ]]; then
Expand Down

0 comments on commit c04e216

Please sign in to comment.