Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

{start,stop}-mycroft.sh: make POSIX sh compatible and fix shellcheck issues #2686

Merged
merged 2 commits into from
May 31, 2022
Merged

{start,stop}-mycroft.sh: make POSIX sh compatible and fix shellcheck issues #2686

merged 2 commits into from
May 31, 2022

Commits on May 9, 2022

  1. {start,stop}-mycroft.sh: fix shellcheck issues

    ShellCheck is a static analysis tool for shell scripts with the goal to:
    - point out and clarify typical beginner's syntax issues that cause a
    shell to give cryptic error messages
    - point out and clarify typical intermediate level semantic problems
    that cause a shell to behave strangely and counter-intuitively
    - point out subtle caveats, corner cases and pitfalls that may cause an
    advanced user's otherwise working script to fail under future
    circumstances
    
    I've ran this tool over both start-mycroft.sh and stop-mycroft.sh and
    fixed any issue that popped up
    PureTryOut committed May 9, 2022
    Configuration menu
    Copy the full SHA
    0ab0e48 View commit details
    Browse the repository at this point in the history

Commits on May 30, 2022

  1. {start,stop}-mycroft.sh: port to POSIX sh

    This makes the start and stop scripts compatible with POSIX shells.
    
    Overview of the changes:
    - "function" statements removed, not necessary and incompatible
    - dashes in function and variable names for lower ones (- to _)
    - source statements changed for .
    - double square brackets replaced for single ones
    - double equal statements replaced for single ones
    - &> (piping stdout and stderr to the same file) replaced for 2>&1 >
    - sourcing of mycroft-skill-testrunner replaced with direct execution
    with Bash
    - replaced BASH_SOURCE with $0, these scripts are never sourced anyway
    - replaced "echo -n" statements with "printf"
    - merged the "" and "all" cases to a single one
    PureTryOut committed May 30, 2022
    Configuration menu
    Copy the full SHA
    43d4e75 View commit details
    Browse the repository at this point in the history