A bash script that will bootstrap any Python script.
Requirements
- Uses Python3
- The command is installed with the same package name as how it is invoked. For example:
pip install cmakelint
allows you to runcmakelint
Usage:
- Copy
bootstrappy
anywhere on your system andchmod +x bootstrappy
. - In a directoryin in your path, soft link to
bootstrappy
with the name of a tool you'd like to bootstrap. From the example earlier that might look like:
$ cd ~bin
$ ln -s /somewhere/bootstrappy cmakelint
# Now you should be able to just run the tool you've installed:
$ cmakelint
Collecting cmakelint
Using cached cmakelint-1.4.1-py3-none-any.whl (12 kB)
Installing collected packages: cmakelint
Successfully installed cmakelint-1.4.1
Syntax: cmakelint.py [--version] [--config=file] [--filter=-x,+y] [--spaces=N]
[--quiet] [--linelength=digits]
<file> [file] ...
filter=-x,+y,...
Specify a comma separated list of filters to apply
spaces=N
Indentation should be a multiple of N spaces
config=file
Use the given file for configuration. By default the file
~/.config/cmakelintrc, $XDG_CONFIG_DIR/cmakelintrc or ~/.cmakelintrc is
used if it exists. Use the value "None" to use no configuration file
(./None for a file called literally None) Only the option "filter=" is
currently supported in this file.
quiet makes output quiet unless errors occurs
Mainly used by automation tools when parsing huge amount of files.
In those cases actual error might get lost in the pile of other stats
prints.
This argument is also handy for build system integration, so it's
possible to add automated lint target to a project and invoke it
via build system and have no pollution of terminals or IDE.
linelength=digits
This is the allowed line length for the project. The default value is
80 characters.
Examples:
--linelength=120
version
Show the version number and end
FATAL ERROR: No files were specified!