Browse Source

Change params parsing in btcpay-setup.sh

feature/more-args
nicolas.dorier 6 years ago
parent
commit
acf8ada654
No known key found for this signature in database GPG Key ID: 6618763EF09186FE
  1. 34
      btcpay-setup.sh

34
btcpay-setup.sh

@ -103,16 +103,38 @@ Add-on specific variables:
END
}
if [[ "$1" != "-i" ]] && [[ "$1" != "--install-only" ]]; then
while (( "$#" )); do
case "$1" in
-i)
START=true
shift 1
;;
--install-only)
START=false
shift 1
;;
--) # end argument parsing
shift
break
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
display_help
return
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done
# If start does not have a value, stophere
if [[ "$START" ]]; then
display_help
return
fi
START=true
if [[ "$1" == "--install-only" ]]; then
START=false
fi
if [[ -z "$BTCPAYGEN_CRYPTO1" ]]; then
if [[ "$OSTYPE" != "darwin"* ]]; then
# Not Mac OS - Mac OS uses it's own env file

Loading…
Cancel
Save