INCOMING_ROOT="/var/www/incoming"
REPO_USER=repo
REPO_GROUP=users
+REPO_USER_HOME="/home/repo"
+UPDATE_REPOS_SCRIPT="${REPO_USER_HOME}/bin/update-repos"
declare -A MAPPINGS=()
for file in ${src_dir}/* ; do
if [[ -f "${file}" ]] ; then
# echo " * ${file}"
+ file_base=$( basename "${file}" )
tgt="${tgt_dir}"
if [[ "${src_dir_part}" =~ ^el && "${file}" =~ src\.rpm$ ]] ; then
tgt="${src_tgt_dir}"
fi
+ tgt_file="${tgt}/${file_base}"
if [[ ! -d "${tgt}" ]] ; then
printf " * "
mkdir -p -v "${tgt}/"
fi
printf " * "
mv -v "${file}" "${tgt}/"
+ printf " "
+ chown -v ${REPO_USER}:${REPO_GROUP} "${tgt_file}"
fi
done
- echo
- echo "Chowning '${src_dir}' to ${REPO_USER}:${REPO_GROUP} ..."
- chown -R ${REPO_USER}:${REPO_GROUP} "${src_dir}"
-
fi
done
+if [[ -x "${UPDATE_REPOS_SCRIPT}" ]] ; then
+ echo
+ echo "Updating Debian repos ..."
+ su --login "${REPO_USER}" --command "${UPDATE_REPOS_SCRIPT}"
+fi
+
for repo_dir in "${REPO_ROOT}"/Yum/* ; do
bname=$( basename "${repo_dir}" )
done
-
# vim: ts=4 et sw=4