#!/bin/bash
# SPDX-FileCopyrightText: © 2012-2014 Germar Reitze
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
# This file is part of the program "Back In Time" which is released under GNU
# General Public License v2 (GPLv2). See LICENSES directory or go to
# <https://spdx.org/licenses/GPL-2.0-or-later.html>.

DIR="user-callback.d"
typeset -i returncode=0

for callback in $(ls -1 $DIR)
do
    if [[ -x ${DIR}/${callback} ]]; then
        ${DIR}/${callback} "$@"
        returncode+=$?
    fi
done
exit $returncode
