Update homeassistant-install.sh

This commit is contained in:
tteckster 2022-04-17 13:06:03 -04:00 committed by GitHub
parent fbda3fcf67
commit c34239ba6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 23 deletions

View File

@ -1,26 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash -ex
set -euo pipefail
set -o errexit shopt -s inherit_errexit nullglob
set -o errtrace
set -o nounset
set -o pipefail
shopt -s expand_aliases
alias die='EXIT=$? LINE=$LINENO error_exit'
trap die ERR
trap 'die "Script interrupted."' INT
function error_exit() {
trap - ERR
local DEFAULT='Unknown failure occured.'
local REASON="\e[97m${1:-$DEFAULT}\e[39m"
local FLAG="\e[91m[ERROR:LXC] \e[93m$EXIT@$LINE"
msg "$FLAG $REASON"
exit $EXIT
}
function msg() {
local TEXT="$1"
echo -e "$TEXT"
}
YW=`echo "\033[33m"` YW=`echo "\033[33m"`
RD=`echo "\033[01;31m"` RD=`echo "\033[01;31m"`