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

Added "show installed" command to hassbian-config. #68

Merged
merged 10 commits into from
Jan 27, 2018
Merged

Added "show installed" command to hassbian-config. #68

merged 10 commits into from
Jan 27, 2018

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Oct 22, 2017

Note: This will only work for suites installed after this update.
If this get merged it will "cancel" the issue #66 and could be used for checks during install prosess, new PR will come for that if this one gets included :)

Didn't find another way to create folder without doing this
@ludeeus ludeeus changed the title Added command for "show installed" WIP: Command for "show installed" Oct 22, 2017
@ludeeus ludeeus changed the title WIP: Command for "show installed" Command for "show installed" Oct 22, 2017
@ludeeus ludeeus changed the title Command for "show installed" Added "show installed" command Oct 22, 2017
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 good but I'll have to do some testing before we merge it into dev 👍

@ludeeus
Copy link
Member Author

ludeeus commented Oct 23, 2017

Ping me if you find some issues :)

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 good but could use some more polish if your up to it.

@@ -1,17 +1,18 @@
#!/bin/bash

SUITE_INSTALL_DIR=/opt/hassbian/suites
SUITE_INSTALL_DB=/srv/homeassistant/hassbian/suite-states
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since your rewriting the state code. Why not remove the old code and move the state file to where the old one was?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ups, removed all referances to old state functions now

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved control dir to srv/homeassistant/hassbian/control

SUITE_INSTALL_DIR=/opt/hassbian/suites
SUITE_INSTALL_DB=/srv/homeassistant/hassbian/suite-states
SUITE_INSTALL_DB_LOCK=/srv/homeassistant/hassbian/suite-states.lock
SUITE_CONTROL_DIR=/opt/hassbian/control
Copy link
Collaborator

Choose a reason for hiding this comment

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

View the previous comment.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ups, removed all referances to old state functions now

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved control dir to srv/homeassistant/hassbian/control

echo install - installs a software suite
echo upgrade - upgrades a software suite
echo show - shows software suites available
echo show-installed - list all packages installed with `hassbian-config`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to mark the installed ones in the show menu instead? Seems redundant to do it like this?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, definitely!

Copy link
Member Author

Choose a reason for hiding this comment

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

image
Prints "installed" if installed after this change is implemented.
But it want to keep the "show-installed" function (removed from usage overview), this will be nice before reinstalling.

if [ "$response" == "y" ]; then
source $SUITE_INSTALL_DIR/install_$1.sh
$1-install-package
sed -i -- 's/SCRIPTSTATE='$SUITESTATE'/SCRIPTSTATE=installed/g' $SUITE_CONTROL_DIR/$1
Copy link
Collaborator

Choose a reason for hiding this comment

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

And else clause and a nice abort could be a good addition to the part.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Member Author

Choose a reason for hiding this comment

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

Also added Y as valid response:
[ "$response" == "y" ] || [ "$response" == "Y" ]

@ludeeus ludeeus changed the title Added "show installed" command Added "show installed" command to hassbian-config Jan 11, 2018
@ludeeus
Copy link
Member Author

ludeeus commented Jan 11, 2018

All requested changes should now be taken care of.

@ludeeus ludeeus changed the title Added "show installed" command to hassbian-config Added "show installed" command to hassbian-config. Jan 12, 2018
@Landrash Landrash added this to the v0.7 milestone Jan 27, 2018
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 good and tagged for 0.7

@Landrash Landrash merged commit d2f00d0 into home-assistant:dev Jan 27, 2018
@ludeeus ludeeus deleted the patch-4 branch January 28, 2018 10:18
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.

3 participants