From 3be7662abfe9fc13524ac9a8b451393ee08f9763 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Sat, 30 Jul 2022 15:19:15 +0200 Subject: [PATCH] fix(auto-updater): add error handler --- scripts/auto-update.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/auto-update.sh b/scripts/auto-update.sh index de86f773..163e1e8a 100755 --- a/scripts/auto-update.sh +++ b/scripts/auto-update.sh @@ -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