install: always stop at first error

This commit is contained in:
Simon Michael 2018-02-17 04:18:28 -08:00
parent baa9907ca7
commit b04cf65a53

View File

@ -1,10 +1,12 @@
#!/bin/bash -e #!/bin/bash
# Easy hledger installation script for POSIX systems. # Easy hledger installation script for POSIX systems.
# Uses cabal if installed and stack is not, # Uses cabal if installed and stack is not,
# or stack, which it will install if needed (or if --force-install-stack is used). # or stack, which it will install if needed (or if --force-install-stack is used).
# Requires bash and some other POSIX tools. # Requires bash and some other POSIX tools.
# This is based on get-stack.sh which is copyright (c) 2015-2017, Stack contributors. # This is based on get-stack.sh which is copyright (c) 2015-2017, Stack contributors.
set -e
usage() { usage() {
cat <<HERE cat <<HERE
hledger-install.sh [-f|--force-install-stack] [-v|--verbose] [-s|--status] [--version] [-h|--help] hledger-install.sh [-f|--force-install-stack] [-v|--verbose] [-s|--status] [--version] [-h|--help]