Use createrepo_c where possible

add hourly createrepo call
This commit is contained in:
2019-07-04 13:55:41 -05:00
parent 31a808c7f5
commit 295a10a071
15 changed files with 91 additions and 27 deletions

51
makerepo Normal file
View File

@@ -0,0 +1,51 @@
#!/bin/bash
if [ -x /usr/bin/createrepo ]
then
CREATEREPO=/usr/bin/createrepo
elif [ -x /usr/bin/createrepo_c ]
then
CREATEREPO=/usr/bin/createrepo_c
fi
BASE_DIR=/var/www/html/packages
(
cd ${BASE_DIR}
for target in *
do
if [ -d ${target} ]
then
(
cd ${target}
for version in *
do
if [ -d ${version} ]
then
(
cd ${version}
for architecture in *
do
if [ -d ${architecture} ]
then
(
cd ${architecture}
case ${target}-${version}-${architecture} in
epel-5-*|trixbox-*-*)
nice ${CREATEREPO} --checksum=sha --database --quiet .
;;
*)
nice ${CREATEREPO} --database --quiet .
;;
esac
)
fi
done
)
fi
done
)
fi
done
)