Skip to content

Commit 9651f01

Browse files
committed
Added a call to run argParse if the script is directly accessed
1 parent b9614c6 commit 9651f01

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

argument-parser.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,3 +201,8 @@ argParse() {
201201

202202
[ $ARG_DEBUG == true ] && echo "Argument Count: $argc"
203203
}
204+
205+
# If we are accessing this script directly run the argument parser, useful for testing
206+
if [ "$0" == "$BASH_SOURCE" ]; then
207+
argParse
208+
fi

0 commit comments

Comments
 (0)