Commit Graph

2 Commits (dev)

Author SHA1 Message Date
Åke fd12c88da5
Refactor/shellcheck bin (#3019)
* Shellcheck and update mycroft-config

* Shellcheck and update mycroft-pip

* Shellcheck and update mycroft-cli-client

* Shellcheck and update mycroft-help

* Shellcheck and update mycroft-listen

* Shellcheck and update mycroft-mic-test

* Shellcheck and update mycroft-msk

* Shellcheck and update mycroft-msm

* Shellcheck and update mycroft-say-to

* Shellcheck and update mycroft-skill-testrunner

* Shellcheck and update mycroft-speak

* Shellcheck and update mycroft-start

* Shellcheck and update mycroft-stop

* Add shellcheck step to github actions

This runs most of the shellcheck tests. The excludes are:
- SC1091: Avoids errors when shellcheck can't find sourced file
- SC2034: Unused variables, for example colors that aren't used yet
- SC2012: use of ls, from what I can see in our case this is fine (wc -l)

The version is locked to latest master as of November 2 2021
2021-11-04 17:01:17 +09:30
Steve Penrod 5e6c1773e4
Unify the command line experience across platforms (#1784)
* Unify the command line experience across platforms

Interacting with Mycroft was slightly different on different platforms
(Mark 1, Github, Picroft), which resulted in confusion and the beginnings of a
documentation/support nightmare.  This moves several of the common commands
into a mycroft-core/bin folder instead of being build in packaging or part
of the Picroft package only.

This required a small changes to the common scripts, in addition to adding
the new scripts.  Here are details:
* dev_setup.sh
  - Stubbed out a setup wizard (TODO)
  - Jumped to latest version of pip (18.0)
  - Set execution flags for new scripts
* start-mycroft.sh
  - Allow auto-execution of dev_setup.sh
  - De-sourced the stop-mycroft.sh calls (not needed)
  - Add quotes to better handle paths with spaces
* stop-mycroft.sh
  - Return exit code to show if a service was stopped or killed
  - Extend the time to wait for a gently shutdown from 2 secs to 5
  - Changed to say "messagebus.service" instead of just "service" to be more clear (the name "service" means nothing to users, but "bus does")
* venv-activate.sh
  - Added help
  - Added -q or --quiet mode
  - Added toggled availability of 'mycroft-venv-activate' and 'mycroft-venv-deactivate' aliases.  Only one is available at any given time.

New scripts:
* mycroft-cli-client: start up the CLI
* mycroft-help: shows hints on using mycroft
* mycroft-mic-test: runs the basic record/playback, playing nicely with a running Mycroft by stopping and restarting services as appropriate
* mycroft-pip: manage the venv via pip
* mycroft-say-to: send utterances, like a user spoke them
* mycroft-speak:  speaks the given phrase using Mycroft
* mycroft-skill-testrunner: invoke the single-skill test runner

All of these scripts are easy to discover by typing "mycroft-" then
hitting the TAB key.

==== INSTALLER NOTES ====
* We no longer need to create mycroft-cli-client and mycroft-pip in the Debian packages.
* mycroft-core/bin should be added to the path

* Corrections after review

Several minor corrections, plus added wrappers for the 'msm' and 'msk'
utilities.

* Set executable flag on script files in bin/

The scripts in the bin/ folder needed to be changed to executable within
git to prevent looking dirty after dev_setup.sh has been run.

* Add executable flag to one more script
2018-09-09 16:55:01 -05:00