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