We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0006406 commit fb5c1a2Copy full SHA for fb5c1a2
update.sh
@@ -1,13 +1,11 @@
1
#!/bin/bash
2
-set -e
+set -eu -o pipefail -x
3
4
# Check for dependencies
5
command -v curl >/dev/null 2>&1 || { echo >&2 "'curl' is required but not found. Aborting."; exit 1; }
6
command -v jq >/dev/null 2>&1 || { echo >&2 "'jq' is required but not found. Aborting."; exit 1; }
7
-if [ -z "${BASH_VERSINFO}" ] || [ -z "${BASH_VERSINFO[0]}" ] || [ ${BASH_VERSINFO[0]} -lt 4 ]; then
8
- echo "BASH version 4.0 or greater is required. Aborting."
9
- exit 1
10
-fi
+[ -n "${BASH_VERSINFO}" ] && [ -n "${BASH_VERSINFO[0]}" ] && [ ${BASH_VERSINFO[0]} -ge 4 ] \
+ || { echo >&2 "Bash 4.0 or greater is required. Aborting."; exit 1; }
11
12
declare -A cmd=(
13
[apache]='apache2-foreground'
0 commit comments