Skip to content

require_exes could be smarter, loading the Apt/RPM or Node package to provide the exe #3

Description

@joeytwiddle

require_exes is currently a way to quickly check for external dependencies, and abort if they are missing.

Example use in a #!/bin/sh script, ensure two audio programs are available:

require_exes bladeenc mp3info || exit 1

To use it in a #!/bin/bash script is a little simpler:

. require_exes bladeenc mp3info

Suggested enhancement: When we call require_exe (or perhaps via a global config file) we can tell it how to install that command if it is not present.

Then it could prompt the user to install the package that would provide the exe, so that the script can continue to run without issue.

(Storing the mapping from command_name to (packager,package_name) in a global file would be DRYer than declaring it on every include!)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions