More explicit argument usage

This commit is contained in:
Daniel Dayley 2021-11-02 20:43:19 -06:00
parent 90396de706
commit ddeb6a4a45

View File

@ -49,6 +49,7 @@ new_python_tool() {
if [[ $(pwd) == *"python-tool"* ]]; then
echo "This script should not be run within the python-tool directory. Please move it to a neutral location to run." && return 1
fi
[ -z "$1" ] && echo "Usage: new_python_tool <name_of_tool>" && return 1
NAME="$1"
if [[ $(echo "$1" | sed 's#^[a-z0-9\-]*$##' ) == "$NAME" ]]; then
echo "Tool name '""$NAME""' is invalid." && return 1