Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

hassbian-scripts: Added --beta to upgrade to prerelease. #151

Merged
merged 3 commits into from
Mar 27, 2018
Merged

hassbian-scripts: Added --beta to upgrade to prerelease. #151

merged 3 commits into from
Mar 27, 2018

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Mar 27, 2018

Description:

Added --beta option to upgrade to pre-release.

Checklist (Required):

If pertinent:

  • [N/A] Script has validation check of the job.
  • Created/Updated documentation at /docs

HASSBIAN_PACKAGE=$(echo hassbian*.deb)

echo "Installing latest release"
sudo apt install -y /tmp/"$HASSBIAN_PACKAGE"

downloadedversion=$(echo $HASSBIAN_PACKAGE | awk -F'_' '{print $2}' | cut -d . -f 1,2,3)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double quote to prevent globbing and word splitting.


downloadedversion=$(echo $HASSBIAN_PACKAGE | awk -F'_' '{print $2}' | cut -d . -f 1,2,3)
currentversion=$(hassbian-config -V)
if [ "$currentversion" > "$downloadedversion" ]; then

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escape > to prevent it redirecting (or switch to [[ .. ]]).

Copy link
Collaborator

@Landrash Landrash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

@Landrash Landrash merged commit 9d63cd9 into home-assistant:dev Mar 27, 2018
@ludeeus ludeeus deleted the hassbian-scripts-beta branch March 27, 2018 11:34
@ludeeus ludeeus added this to the v0.9.0 milestone Mar 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants