fix(auto-updater): add error handler

This commit is contained in:
MedzikUser 2022-07-30 15:19:15 +02:00
parent 300a375e16
commit 3be7662abf
1 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
# Commit changes to Git.
# Enable commit changes to git
: "${GIT_COMMIT_PACKAGES:=false}"
# Push changes to remote.
# Enable push changes to git
: "${GIT_PUSH_PACKAGES:=false}"
SCRIPT_DIR="$(realpath "$(dirname "$0")")"
@ -26,6 +26,8 @@ update-package() {
local pkgdir="${1}"
local pkgname="$(basename ${pkgdir})"
trap 'echo "Error code $? occurred in package ${pkgname} on line ${LINENO}" 1>&2 ; return 1' ERR
if [ ! -f "${pkgdir}/built.conf" ]
then
return 0