mirror of
https://github.com/fauxpilot/fauxpilot.git
synced 2025-08-20 21:34:13 -07:00
Merge pull request #105 from leemgs/upstream-unknow-flag-removal
feat: add option of launch.sh to avoid unknown flags issue
This commit is contained in:
commit
ecc47dbf96
1 changed files with 25 additions and 1 deletions
26
launch.sh
26
launch.sh
|
@ -7,5 +7,29 @@ if [ ! -f .env ]; then
|
|||
fi
|
||||
source .env
|
||||
|
||||
function showhelp () {
|
||||
# Display Help
|
||||
echo
|
||||
echo "Usage: $0 [option...]"
|
||||
echo "options:"
|
||||
echo " -h Print this help."
|
||||
echo " -d Start in daemon mode."
|
||||
echo
|
||||
}
|
||||
|
||||
while getopts "hd" option; do
|
||||
case $option in
|
||||
h)
|
||||
showhelp
|
||||
exit;;
|
||||
d)
|
||||
options="-d"
|
||||
;;
|
||||
\?) # incorrect option
|
||||
echo "Error: Invalid option"
|
||||
exit;;
|
||||
esac
|
||||
done
|
||||
|
||||
# On newer versions, docker-compose is docker compose
|
||||
docker compose up -d --remove-orphans || docker-compose up -d --remove-orphans
|
||||
docker compose up $options --remove-orphans || docker-compose up $options --remove-orphans
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue