On serial connections, with weird terminal emulators or when run interactively
the terminal may not support colours this would cause the dev_setup to
be aborted. This adds a simple check for terminal colors.
"-1" for no color support was empirically established.
add `os_is()` and `os_is_like()` call support for debian-like OSes (specifically Mint, but also cover Ubuntu)
Ubuntu should already be covered via "is like debian" (but now we're extra covered)
Also if there is NO match, we should really prompt the user for what to do.
+ Always use single quotes around strings that are fully meant literal and do not contain single quotes themselves.
+ Remove curly braces around variable names, if no next character or a space is following.
+ Remove curly braces double quotes around single variables (and command substitutions) that are assigned to variables. The contained strings are always added correctly with spaces.
+ Merge multiple printed lines into one echo call.
* Improve detection of correct package manager
Use the new function os_is_like to detect Fedora based systems and Debian derivatives.
* Update manual install instructions
Manual install instructions were quite outdated and does not match the
actual needed packages.
* Update colors.
Green for detected OSes, Yellow if OS was not detected. Blue is kept for
package highlighting list of packages needed.
+ Consequently use double square brackets (over single square backets), to be consistent and benefit from this syntax
+ Skip obsolete quoting of left sided variables and strings in double square brackets
+ Use "-z" instead of comparing with empty string explicitly in double square brackets
+ Merge multiple double square bracket expressions, connected by "&&" or "||", into a single expression
+ "! -z" => "-n"
+ Remove obsolete free spaces from command substitutions, to be consistent
This finds the default group of the user and uses that as group when doing chown in dev_setup.sh the same way as it's done in the prepare-msm.sh script
* Install pep8 check as pre-commit hook
If no pre-commit hook exists the scripts/pre-commit will be installed as a pre-commit hook checking for PEP8 issues when making a commit. It will also allow overwriting the pre-commit hook installed by previous dev_setups.
* Ask before installation of the pre-commit hook.
The sudo command check was performed only when packages were installed and not before the interactve portion leaving $SUDO unset when trying to create the /opt/mycroft folder.
Improved the dev_setup.sh in several ways:
* Add 'wizard' that walks new users through setup
- Option to put the mycroft-core/bin folder in the path
- Option to change to 'master' instead of 'dev' branch. This is
usually desirable for users who only run Mycroft, not developers.
- Option to auto-update when running Mycroft
- Add soft link <mycroft-core>/skills to the /opt/mycroft/skills
directory
Improve the start-mycroft.sh script
* Unify some duplicated code under init-once() function
* Add support for "auto-update", which attempts a git pull at startup
* Add require-process() function which doesn't restart already
running services
* Add require-process for messagebus and skills services when running
the CLI
* Tweak the --help message
Add a -sm "Skip mimic" option to dev_setup.sh which
will always prevent the download and complile of
the original Mimic. By default, we still want to
do this all the time, but there are situations where
it is convenient to skip this time-consuming step.
* bugfix/issue-1913 fixed bug with new flag
- `--no-error` can be used to disable exit-on-error behaviour
- improved print out in function show_help() to take a little less time and take up a little less space by using only one `echo` command, should work the exact same otherwise.
* Add test separating centOS and Fedora
Use /etc/os-release scanning for the ID present in os-release. Which is
supported by most modern linux distributions.
* Add Redhat Enterprise Linux