update_git_repositories.sh: add path '/root/crontab'.

This commit is contained in:
Christoph 2024-12-08 11:50:14 +01:00
parent e6b0a946f4
commit 8914e5ba25

View File

@ -117,7 +117,7 @@ if [[ -f "$conf_file" ]]; then
source "$conf_file"
fi
[[ -z "$GIT_BASE_DIRECTORIES" ]] && GIT_BASE_DIRECTORIES="/usr/local/src /root/bin"
[[ -z "$GIT_BASE_DIRECTORIES" ]] && GIT_BASE_DIRECTORIES="/usr/local/src /root/bin /root/crontab"
@ -131,6 +131,9 @@ fi
for _git_base_dir in $GIT_BASE_DIRECTORIES ; do
blank_line
[[ ! -d "${_git_base_dir}" ]] && continue
for _dir in $(ls ${_git_base_dir}/) ; do
[[ ! -d "${_git_base_dir}/$_dir" ]] && continue
[[ ! -d "${_git_base_dir}/${_dir}/.git" ]] && continue
@ -151,17 +154,17 @@ for _git_base_dir in $GIT_BASE_DIRECTORIES ; do
done
done
if [[ -d "/root/crontab/backup-rcopy" ]]; then
blank_line
echononl "Update Repository \033[1mbackup-rcopy\033[m.."
git -C "/root/crontab/backup-rcopy" pull > $log_file 2>&1
if [[ $? -eq 0 ]] ; then
echo_done
else
echo_failed
error "$(cat $log_file)"
fi
fi
#if [[ -d "/root/crontab/backup-rcopy" ]]; then
# blank_line
# echononl "Update Repository \033[1mbackup-rcopy\033[m.."
# git -C "/root/crontab/backup-rcopy" pull > $log_file 2>&1
# if [[ $? -eq 0 ]] ; then
# echo_done
# else
# echo_failed
# error "$(cat $log_file)"
# fi
#fi
blank_line
clean_up