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

hassbian-config: Minor change to show-installed. #152

Merged
merged 3 commits into from
Mar 27, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/hassbian_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ where command is one of:
- `show` This will show you all available suites.
- `log` This will show you the log of last hassbian-config operation.
- `share-log` This will generate an hastebin link of the last hassbian-config operation.
- `show-installed` Generates a list of installed suites.

Optional flags:
- `-Y | --accept` This will accept defaults on scripts that allow this.
Expand Down
18 changes: 10 additions & 8 deletions package/usr/local/bin/hassbian-config
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ function help {
printf "\\n"
printf "usage: hassbian-config [command] [suite] [options]\\n"
printf "where [command] is one of:\\n"
printf "%-8s\\t%s\\n" " install" "Installs a software [suite]"
printf "%-8s\\t%s\\n" " upgrade" "Upgrades a software [suite]"
printf "%-8s\\t%s\\n" " show" "To see available [suite] for install/upgrade"
printf "%-8s\\t%s\\n" " log" "Displays an log of the last operation"
printf "%-8s\\t%s\\n" " share-log" "Generates an hastebin link of the last operation"
printf "%-8s\\t%s\\n" " install" "Installs a software [suite]."
printf "%-8s\\t%s\\n" " upgrade" "Upgrades a software [suite]."
printf "%-8s\\t%s\\n" " show" "To see available [suite] for install/upgrade."
printf "%-8s\\t%s\\n" " log" "Displays an log of the last operation."
printf "%-8s\\t%s\\n" " share-log" "Generates an hastebin link of the last operation."
printf "%-8s\\t%s\\n" " show-installed" "Generates a list of installed suites."
printf "\\n"
printf "available optional [options]:\\n"
printf "%-10s\\t%s\\n" " -Y | --accept" "Accept defaults on scripts that allow this"
printf "%-10s\\t%s\\n" " -F | --force" "Force run an script, this is useful if you need to reinstall a package"
printf "%-10s\\t%s\\n" " -Y | --accept" "Accept defaults on scripts that allow this."
Copy link
Collaborator

Choose a reason for hiding this comment

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

scripts that allows this.

printf "%-10s\\t%s\\n" " -F | --force" "Force run an script, this is useful if you need to reinstall a package."
printf "%-10s\\t%s\\n" " -D | --debug" "This will output every comand to the console."
printf "%-10s\\t%s\\n" " -B | --beta" "This will install the current beta version if implemented."
printf "%-10s\\t%s\\n" " --dev" "This will install the current development version if implemented."
Expand Down Expand Up @@ -190,12 +191,13 @@ function verify-suite {

function show-installed-suites {
INSTALLERS=$(find $SUITE_INSTALL_DIR/ -maxdepth 1 -type f | sort | awk -F'/' ' {print $NF}' | awk -F. '{print $1}')
echo "These suites are installed:"
for i in $INSTALLERS
do
if [ -f "$SUITE_CONTROL_DIR/$i" ]; then
STATE=$(grep "SCRIPTSTATE=installed" $SUITE_CONTROL_DIR/"$i" | awk -F'=' '{print $2}')
if [ "$STATE" != "" ]; then
echo "$i:" "$STATE"
echo "$i"
fi
fi
done
Expand Down