mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-21 13:54:29 -07:00
Small fixes to launch.sh option parsing
* Fixed a small mistake that prevented the -h option from working. * Corrected some capitalization / grammar issues in the help text. * Removed a debug print that was left in.
This commit is contained in:
parent
3ddde13f5f
commit
df15a58544
1 changed files with 5 additions and 6 deletions
11
launch.sh
11
launch.sh
|
@ -7,24 +7,23 @@ if [ ! -f .env ]; then
|
||||||
fi
|
fi
|
||||||
source .env
|
source .env
|
||||||
|
|
||||||
function help() {
|
function showhelp () {
|
||||||
# Display Help
|
# Display Help
|
||||||
echo
|
echo
|
||||||
echo "Usage: $0 [option...]"
|
echo "Usage: $0 [option...]"
|
||||||
echo "options:"
|
echo "options:"
|
||||||
echo "-h, --help Print this Help."
|
echo " -h Print this help."
|
||||||
echo "-d, --daemon Start with a daemon mode."
|
echo " -d Start in daemon mode."
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
while getopts ":h:d" option; do
|
while getopts "hd" option; do
|
||||||
case $option in
|
case $option in
|
||||||
h)
|
h)
|
||||||
help
|
showhelp
|
||||||
exit;;
|
exit;;
|
||||||
d)
|
d)
|
||||||
options="-d"
|
options="-d"
|
||||||
echo "-d option"
|
|
||||||
;;
|
;;
|
||||||
\?) # incorrect option
|
\?) # incorrect option
|
||||||
echo "Error: Invalid option"
|
echo "Error: Invalid option"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue