summaryrefslogtreecommitdiffstats
path: root/cron-jobs/create-filelists
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2010-11-25 13:28:04 +0100
committerPierre Schmitz <pierre@archlinux.de>2010-11-25 13:28:04 +0100
commit447986d17554c183d958cf7de79d1904fc32aaf6 (patch)
tree59ba403ed6ec5431c13d3871d5bbbae87193f167 /cron-jobs/create-filelists
parent793d78130ba808ee688c8b7139a2bc6180b29534 (diff)
downloaddbscripts-447986d17554c183d958cf7de79d1904fc32aaf6.tar.gz
dbscripts-447986d17554c183d958cf7de79d1904fc32aaf6.tar.xz
Add FILESEXT variable for use in create-filelists
Diffstat (limited to 'cron-jobs/create-filelists')
-rwxr-xr-xcron-jobs/create-filelists8
1 files changed, 3 insertions, 5 deletions
diff --git a/cron-jobs/create-filelists b/cron-jobs/create-filelists
index d8a5ba1..010194b 100755
--- a/cron-jobs/create-filelists
+++ b/cron-jobs/create-filelists
@@ -18,15 +18,13 @@ MYTMPDIR="$(mktemp -d ${WORKDIR}/create-filelists.tmpdir.XXXXXX)" || exit 1
#adjust the nice level to run at a lower priority
/usr/bin/renice +10 -p $$ > /dev/null
-case "${DBEXT}" in
+case "${FILESEXT}" in
*.gz) TAR_OPT="z" ;;
*.bz2) TAR_OPT="j" ;;
*.xz) TAR_OPT="J" ;;
- *) die "Unknown compression type for DBEXT=${DBEXT}" ;;
+ *) die "Unknown compression type for FILESEXT=${FILESEXT}" ;;
esac
-FILESEXT="${DBEXT//db/files}"
-
for repo in ${PKGREPOS[@]}; do
REPO_DB_FILE="${repo}$DBEXT"
FILES_DB_FILE="${repo}$FILESEXT"
@@ -77,7 +75,7 @@ for repo in ${PKGREPOS[@]}; do
mkdir -p "$pkgdir"
pushd "${MYTMPDIR}/${repodir}" >/dev/null
[ -f "${pkgdir}/${FILES_DB_FILE}" ] && rm "${pkgdir}/${FILES_DB_FILE}"
- bsdtar --exclude=*${DBEXT//\.db/} -c${TAR_OPT}f "${pkgdir}/${FILES_DB_FILE}" *
+ bsdtar --exclude=*${FILESEXT} -c${TAR_OPT}f "${pkgdir}/${FILES_DB_FILE}" *
popd >/dev/null
fi
popd >/dev/null