Commit Graph

73 Commits (dev)

Author SHA1 Message Date
Åke dd7f7abba6
Shellcheck scripts folder (#3063)
* Remove unused scripts

install-pocketsphinx and install-pygtk is no longer used by the
dev-setup.

* Fix shellcheck issues in scripts

* Remove space in cores argument

* Update my-info.sh script

- Make it use the new method to activate venv if needed
- Improve requirements.txt parsing
- Update process detection from old "screen" setup
- Update log-files paths
- Fix finding mycroft-core folder

* Fix shellcheck issues in mycroft-use.sh

Mainly quoting but also unpacking of arguments and improving some if
statements

* Update shellcheck test to include scripts folder
2022-02-28 14:44:15 +09:30
Philippe Coval 0f8222eef4 scripts: Support busybox chown
Those extra options are not enabled in busybox
(at least not the configured version in poky yocto distribution)

This will also help to support systems without coreutils,

Forwarded: https://github.com/MycroftAI/mycroft-core/pull/2966
Relate-to: https://github.com/MycroftAI/mycroft-core/pull/2686
Signed-off-by: Philippe Coval <philippe.coval@astrolabe.coop>
2021-08-09 09:13:45 +02:00
Bart Ribbers 531f78c499
Move requirements.txt to a new requirements folder and add optional deps
Some dependencies aren't actually required but can be optionally
installed for extra functionality.

The Chromecast is an optional audio backend
VLC is an optional audio backend
pyalsaaudio is only used by the mark1 enclosure
google-api-python-client is an optional STT backend, by default Mycroft
uses the Mycroft servers
2020-05-11 15:31:10 +02:00
el-tocino d7a4aa13d7 have a default if run without a core param 2020-04-30 10:32:40 -05:00
Chris Veilleux 0edccca65a remove the -v from the chown command in prepare-msm
This reduces the verbosity during the operation. This is not of much
interest, mainly success or failure is what matters.
2020-03-23 11:41:13 +01:00
maxbachmann 7a48297132 cleanup python2 unicode 2019-11-26 23:09:32 +01:00
Christian Clauss 121577487f Replace $IS_TRAVIS with builtin $CI
Updates dev_setup.sh and scripts/prepare_msm.sh
Fixes #2243
2019-09-26 16:31:46 +02:00
Chris Veilleux 293ea0aaf7 removed superfluous whitespace 2019-08-29 19:24:52 -05:00
Chris Veilleux 0faa2a4451 Applied a code review change to make the datetime representation on the output file to suite different locales 2019-08-29 19:24:01 -05:00
Chris Veilleux ad40c43d7b new script to do what the cli does with the logs in real time, only for historical log viewing. this script is good for viewing merged process logs at boot time or at a point in the past. 2019-08-02 11:19:00 -05:00
Kris Gesling 245458fa86 fix: permission group tests against user 2019-05-23 15:38:57 +09:30
Steve Penrod 255f0e1644
Fix copy/paste error in chmod command
The command that is supposed to re-enable the mycroft-core hourly cron job was
using "-x" instead of "+x".
2019-05-22 05:42:56 -05:00
Åke Forslund bcd4084685 Switch pep8 for pycodestyle
- Make sure the pycodestyle installed with mycroft-core is used
- Ignore binary operator warning
2019-05-15 13:46:02 +02:00
Åke 8a82168168 Install pep8 check as pre-commit hook (#1994)
* 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.
2019-03-27 01:28:29 -05:00
Alistair Francis 5a164dbc25 scripts/prepare-msm.sh: Use SUDO variable
Use the sudo variable and allow the script to run if we don't have sudo.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2019-01-22 10:43:36 -08:00
Gaurav Juvekar ee4646b9e1 Replace hard coded data directory path in echo 2018-10-06 13:29:47 -04:00
el-tocino 979c02158d Issue 1475: Mimic build failed when spaces in the path (#1772)
* fix for path with spaces in mimic build
2018-08-29 04:25:14 -05:00
Robert Sprunk a70e9f6c3f Replace static /opt/mycroft in prepare-msm.sh (#1700)
Replace static /opt/mycroft to use the environment variable instead.
2018-08-03 00:06:17 -05:00
Julien Kassar ed556b09df Standardize shell scripts (#1711)
* Standardize shebangs
* Standardize spaces
* Standardize functions declaration
* Standardize conditional constructs
* Standardize double quotes
* Standardize command substitution
* Standardize sed command
2018-08-02 14:48:47 -05:00
Åke 23fcc631c4 Bugfix mycroft-use github (#1659)
* Fix startup scripts

- change start.sh to the new start-mycroft.sh
- fix startup of messagebus service
- fix startup of enclosure

* Fix running dev_setup.sh as root

Use --allow-root when calling dev_setup.sh

* Correct default directory for user

On the Mark-1 the script would create the mycroft-core repo in /home/root instead of /root when running the script as root

* Skip mimic installation correctly

* Allow doing the github install without root

Running mycroft under root stumbles into issues accessing the audio. allowing unstall under pi user is also more intuitive.

* Change ownership of the webcache

* fix starting/stopping wifi-service

* Fix switching permissions

* Correct startup order

- load messagebus before enclosure
- reboot to workaround audio input issue

* Disable updates when switched to github install

* Fix identity update

identity updates weren't transfered back to the mycroft user since the linked file was overwritten. Now the identity folder is linked instead.
2018-07-10 03:26:30 -05:00
Matthew D. Scholefield 509162de50 Support tilda in data_dir 2018-05-23 15:03:01 -05:00
Matthew D. Scholefield a20b5b565c Cleanup skill loading and implement python msm 2018-05-08 13:41:51 -05:00
Åke Forslund 82f6af77b8 Update pygtk link
Update to the new archive along and enable follow redirect curl flag
2018-04-18 11:04:58 -05:00
Åke Forslund 6f62dc2186 Add support for installing on openSuse
- Use Zypper to install packages
- use group of current user when changing owner of /opt/mycroft
2018-03-28 15:39:03 -05:00
penrods 66f94962a3 Fix simple typo in switch to Github
The missing space breaks the shell path test when switching to a Github install
2017-12-09 15:58:27 -06:00
Åke Forslund f23ba5197e Remove all mycroft packages individually
Autoremove don't seem to be reliable enough. This will remove the
required packages individually.
2017-11-19 00:24:48 -06:00
Åke Forslund 9bb1d18161 Use autoremove when removing mycroft-mark-1
remove will only remove the meta package, autoremove will remove the
meta package and all packages installed as dependencies for that
package.
2017-11-09 12:52:40 -06:00
penrods c075aec77f Add 'home' and 'home-test' to mycroft-use.sh
Decouple the chosen backend from the stable/unstable build in the mycroft-use
utility.  Now there are independent 'home' and 'home-test' options that can
be used switch the chosen backend.

Also fix several issues with the utility, including:
* Platform is detected and appropriate packages (mycroft-picroft, etc) used.
* Added missing services to the github support
* Improved help message
2017-10-28 03:02:46 -05:00
penrods 760f2fb182 Disconnect test backend from unstable in mycroft-use
The mycroft-use utility had a direct connection between the unstable build and
the test backend; and the stable build and the production backend.  This made
some kinds of testing tricky.

Now you run ```mycroft-use home``` and ```mycroft-use home-test``` to make
the backend association explicitly.

Also cleaned up the whitespace, which was a mixture of spaces and tabs.
2017-10-27 15:48:30 -05:00
Jonas Blahut 3582c0d1e4 Fix cd syntax to avoid "too many arguments" error. 2017-10-26 18:49:31 -05:00
Rhett Aultman 35c3af1e2c Make mycroft-core.sh invocable from outside
mycroft-core.sh has a relative-path call (that itself also likes to
be called from inside mycroft-core) that prevents making a clean start
of mycroft from outside the mycroft-core directory.  This makes doing
things like adding it as a Ubuntu Unity startup application slightly
messy.
2017-10-26 19:06:11 -04:00
penrods 8f2e5d9498 Change to Apache 2.0 license from GPLv3.0
This commit officially switches the mycroft-core repository from
GPLv3.0 licensing to Apache 2.0.  All dependencies on GPL'ed code
have been removed and we have contacted all previous contributors
with still-existing code in the repository to agree to this change.

Going forward, all contributors will sign a Contributor License
Agreement (CLA) by visiting https://mycroft.ai/cla, then they will
be included in the Mycroft Project's overall Contributor list,
found at: https://github.com/MycroftAI/contributors.  This cleanly
protects the project, the contributor and all who use the technology
to build upon.

Futher discussion can be found at this blog post:
https://mycroft.ai/blog/right-license/

This commit also removes all __author__="" from the code.  These
lines are painful to maintain and the etiquette surrounding their
maintainence is unclear.  Do you remove a name from the list if the
last line of code the wrote gets replaced?  Etc.  Now all
contributors are publicly acknowledged in the aforementioned repo,
and actual authorship is maintained by Github in a much more
effective and elegant way!

Finally, a few references to "Mycroft AI" were changed to the correct
legal entity name "Mycroft AI Inc."

==== Fixed Issues ====
#403 Update License.md and file headers to Apache 2.0
#400 Update LICENSE.md

====  Documentation Notes ====
Deprecated the ScheduledSkill and ScheduledCRUDSkill classes.
These capabilities have been superceded by the more flexible MycroftSkill
class methods schedule_event(), schedule_repeating_event(), update_event(),
and cancel_event().
2017-10-04 01:28:44 -05:00
Steve Penrod 07992b49d5 Revamping the scripts used to start/stop Mycroft
Reworking the mechanisms used to interact with Mycroft.  The old
mycroft.sh utilized the 'screen' command, but now with the CLI it
it easier to use that for viewing log files.  Plus there was
confusion between when to use start.sh and when to use mycroft.sh.

Now things are wrapped in the simple and easily discoverable scripts:
* start-mycroft.sh
* stop-mycroft.sh

The start-mycroft.sh allows you to start the background services and
to invoke the various tools (e.g. the CLI, unit tests, etc).

==== Fixed Issues ====

====  Documentation Notes ====
This will require revamp of the getting started guides, etc.
2017-09-28 01:08:20 -05:00
Michael Nguyen 592882d125 fixed codacity again 2017-09-14 14:23:39 -05:00
Michael Nguyen 8c88c0f2ae fixed codacity 2017-09-14 14:23:39 -05:00
Michael Nguyen 00f9bac927 Commit headline -- not longer than this line (50)
This is the template for commits to mycroft-core and also an example of
a commit message. To use this template, change the first line (think of
it as a "headline" for the commit) and then edit this message with a
longer description of the change.  To be nice, keep lines to 72
characters or less (The first two lines of this template are exactly
that length).  Also use imperative writing, e.g. "Fix broken code" or
"Implement my new feature", not "Fixes the broken code" or
"Implemented my new feature".

Sections below can then be filled out and edited as appropriate.
Unused sections can optionally be removed.

Please fill this out carefully.  This moment is when the code is
clearest in the mind of you, the foremost expert in this change.
Please pause to think of side effects and impacts.

====  Documentation Notes ====
mycroft-use script is used to switch from stable and unstbale builds for the mycroft core. It also points the unstable build to use the home-test.mycroft.ai cluster instead of production cluster.

mycroft-packaging repo needs to be merged to master for the packaging to take place.
2017-09-14 14:23:39 -05:00
el-tocino 9597890885 pass cores as a parameter to install scripts 2017-08-17 16:18:01 +09:00
el-tocino 95b212800a move cores calc to mimic script 2017-08-17 16:18:01 +09:00
aatchison 2124d730d2 Commit headline -- not longer than this line (50)
==== Fixed Issues ====
984 - install_mimic.sh -- Mimic shouldn't have to clone all branches
====  Tech Notes ====
This modification clones the mimic repository with a depth of one in
order to reduce download times and local size. A side affect might be
that this would make it harder for developers to checkout different
mimic branches, as they would have to tech them first.
2017-08-14 09:04:52 +09:00
aatchison 4be137944e Altered prepare-msm.sh to change permissions to the correct user
Added a function to change ownership
Added an ownership check that is always run in the case of a botched run the first time
2017-08-02 10:46:28 -05:00
Åke Forslund bfc2d3eced Starup audio process together with mycroft 2017-07-31 13:37:17 +02:00
Caesar 9bc6fc23d2 correcting a misspelling o line 15 2017-07-08 21:27:03 -03:00
Matthew D. Scholefield 8e17fe3fd4 Improve mycroft.sh (#835)
* Improve mycroft.sh

 - Refactor to make adding other scripts easier
 - Stop all skills before starting
 - Handle multiple screen instances running at the same time
 - Notify the user by screen name (not as pretty but makes more sense)
 - Clean up code:
   - Change if chain to switch statement
   - use cat to display usage rather than multiple echo statements

* Small mycroft.sh refactor
 - Auto-generate .screen files
 - Add start-mycroft-custom for other executables
 - Use echo instead of cat (originally didn't realize multiline quotes were a thing)
 - Rename variable screen_name to uppercase to be consistent

* Decrease mycroft.sh sleep time to 0.1 seconds
Less time to wait and still seems to work fine on all tested platforms
2017-06-15 17:42:56 -05:00
el-tocino eeb3c7fe06 punctuation matters. 2017-05-18 16:53:10 -03:00
el-tocino 4372d6f9ab more complete audio info 2017-05-18 16:53:10 -03:00
el-tocino c6179eb937 Issues-739 Adding my-info.sh 2017-05-18 16:53:10 -03:00
Steve Penrod 96332ac77c Fixing minor issues from review 2017-04-14 19:41:00 -05:00
Augusto Monteiro 'Sparky 9e7e2c12f9 #663 - removing install msm 2017-04-14 19:41:00 -05:00
Joel Bradshaw 5e55a117c8 Fix creation of /opt/mycroft/skills 2017-04-07 21:20:34 +01:00
Arron Atchison ff01f929eb Added variable in travis.yml and a check in install-msm.sh to disable creating opt/mycroft/skills 2017-04-03 13:33:28 -07:00