if [[ -n "$@" ]] ; then
repositories="$@"
else
- # use all subdirs in install-rpms by default
- repositories=/var/www/html/install-rpms/*
+ # consider all subdirs in install-rpms by default, except the slice repos
+ # use find instead of ls - for the corner case where the dir. is empty
+ # (thanks Thomas Dreibholz for the heads up)
+ repositories=$(find /var/www/html/install-rpms -maxdepth 1 -mindepth 1 -type d \! -name 'slice-*' 2> /dev/null)
fi
# filter out PRESERVE'd repos
result "$MESSAGE"
;;
+ index)
+ # just rerun createrepo
+ shift
+ if [[ -z "$@" ]] ; then
+ # use all subdirs in install-rpms by default
+ repositories=/var/www/html/install-rpms/*
+ else
+ # else use argv
+ repositories=$@
+ fi
+
+ for repository in $repositories ; do
+ echo ============================== running createrepo in $repository
+ createrepo -g yumgroups.xml $repository
+ done
+ ;;
clean)
shift
if [[ -z "$@" ]] ; then