summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2009-05-13 11:06:06 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-05-13 13:09:41 -0700
commitc076b93fafbf47a85bd063c626621552f364a59d (patch)
treea71efa3f450dfd1fdca1ced0af06003182106ab8 /cron-jobs
parent8276b6fefffb9f092ed8713c1cf01220e21c46eb (diff)
use pkgext defined in makepkg.conf
Signed-off-by: Pierre Schmitz <pierre@archlinux.de> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/createFileLists16
1 files changed, 11 insertions, 5 deletions
diff --git a/cron-jobs/createFileLists b/cron-jobs/createFileLists
index 697c39d..6d03260 100755
--- a/cron-jobs/createFileLists
+++ b/cron-jobs/createFileLists
@@ -1,11 +1,17 @@
#!/bin/bash
reposdir=/srv/ftp/
-#targetdir=/home/pierre/public_html/test-repo/
targetdir=$reposdir
repos="core extra testing community"
arches="i686 x86_64"
+if [ -f /etc/makepkg.conf ]; then
+ . /etc/makepkg.conf
+else
+ echo "Error: /etc/makepkg.conf does not exist."
+ exit 1
+fi
+
if [ -f "/tmp/createFileList.lock" ]; then
echo "Error: createFileList allready in progress."
exit 1
@@ -22,7 +28,7 @@ getpkgname() {
local tmp
tmp=${1##*/}
- tmp=${tmp%.pkg.tar.gz}
+ tmp=${tmp%$PKGEXT}
tmp=${tmp%-i686}
tmp=${tmp%-x86_64}
tmp=${tmp%-any}
@@ -31,7 +37,7 @@ getpkgname() {
cd $reposdir
for repo in $repos; do
- REPO_DB_FILE=${repo}.files.tar.gz
+ REPO_DB_FILE=${repo}.files.tar.${DB_COMPRESSION}
for arch in $arches; do
repodir=${repo}/os/${arch}/
cached="no"
@@ -44,7 +50,7 @@ for repo in $repos; do
fi
# create file lists
- for pkg in $repodir*.pkg.tar.gz; do
+ for pkg in $repodir*${PKGEXT}; do
basename=$(basename $pkg)
pkgname=$(getpkgname $basename)
tmppkgdir=${TMPDIR}/${repodir}${pkgname}/
@@ -69,7 +75,7 @@ for repo in $repos; do
cd ${TMPDIR}/${repodir}
[ -f "${pkgdir}${REPO_DB_FILE}.old" ] && rm "${pkgdir}${REPO_DB_FILE}.old"
[ -f "${pkgdir}${REPO_DB_FILE}" ] && mv "${pkgdir}${REPO_DB_FILE}" "${pkgdir}${REPO_DB_FILE}.old"
- bsdtar --exclude=*.tar.gz -czf ${pkgdir}${REPO_DB_FILE} *
+ bsdtar --exclude=*.tar.${DB_COMPRESSION} -cf ${pkgdir}${REPO_DB_FILE} *
fi
cd $reposdir