-
-
Notifications
You must be signed in to change notification settings - Fork 97
Added "show installed" command to hassbian-config. #68
Conversation
Didn't find another way to create folder without doing this
There was a problem hiding this 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 👍
Ping me if you find some issues :) |
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
View the previous comment.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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` |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, definitely!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
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" ]
All requested changes should now be taken care of. |
There was a problem hiding this 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
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 :)