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

hassbian-config: Usage cleanup, added new help and command options. #125

Merged
merged 7 commits into from
Feb 25, 2018
Merged

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Feb 24, 2018

Description:

  • usage (if hassbian-config is used wrong) now only prints two lines.
  • Added new help function (rewrite of the old usage function).
  • Added sudo check to install and upgrade function.
  • Removed sudo check inside suite scripts.
  • Added new commands:
    • -H and --help to show the help menu.
    • --version, as alias to -V
    • --force as alias to -f
    • --accept as alias to -y

Related issue (if applicable): Fixes #

Checklist:

  • The code change is tested and works locally.

If pertinent:

  • Created/Updated documentation at /docs

Screenshot of the help function:
image

@ludeeus ludeeus added this to the v0.8.0 milestone Feb 24, 2018
@@ -83,6 +97,10 @@ function share-log {
}

function install-suite {
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo hassbian-config install "$1"\"" 1>&2

Choose a reason for hiding this comment

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

The surrounding quotes actually unquote this. Remove or escape them.
Double quote to prevent globbing and word splitting.

@@ -112,6 +130,10 @@ function install-suite {
}

function upgrade-suite {
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo hassbian-config upgrade "$1"\"" 1>&2

Choose a reason for hiding this comment

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

The surrounding quotes actually unquote this. Remove or escape them.
Double quote to prevent globbing and word splitting.

@@ -83,6 +97,10 @@ function share-log {
}

function install-suite {
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use 'sudo hassbian-config install "$1"'" 1>&2

Choose a reason for hiding this comment

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

The surrounding quotes actually unquote this. Remove or escape them.
Double quote to prevent globbing and word splitting.

@@ -112,6 +130,10 @@ function install-suite {
}

function upgrade-suite {
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use 'sudo hassbian-config upgrade "$1"'" 1>&2

Choose a reason for hiding this comment

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

The surrounding quotes actually unquote this. Remove or escape them.
Double quote to prevent globbing and word splitting.

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.

Looks great 🍪

@Landrash Landrash merged commit d2a6393 into home-assistant:dev Feb 25, 2018
@ludeeus ludeeus deleted the usage branch February 25, 2018 10:58
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.

4 participants