summaryrefslogtreecommitdiffstats
path: root/cron-jobs/create-filelists
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-02-27 17:58:22 +0100
committerDan McGee <dan@archlinux.org>2010-02-27 18:34:18 +0100
commit6587ebadf6b3a0d8e58be1ab7169a4c2f88ed57c (patch)
treeb97c37fcf2ba23bbd4a5ac7997b23679a4ee76ce /cron-jobs/create-filelists
parent1d6421c7a12e9a07d00ec4de999ae95f7dd0874e (diff)
downloaddbscripts-6587ebadf6b3a0d8e58be1ab7169a4c2f88ed57c.tar.gz
dbscripts-6587ebadf6b3a0d8e58be1ab7169a4c2f88ed57c.tar.xz
create-filelists: s/REPO_DB_FILE/FILES_DB_FILE/g
This will set up changes soon to come where we actually use the real repos DB file so I don't want variable name confusion. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'cron-jobs/create-filelists')
-rwxr-xr-xcron-jobs/create-filelists14
1 files changed, 7 insertions, 7 deletions
diff --git a/cron-jobs/create-filelists b/cron-jobs/create-filelists
index e90da00..a0b6a57 100755
--- a/cron-jobs/create-filelists
+++ b/cron-jobs/create-filelists
@@ -30,7 +30,7 @@ esac
FILESEXT="${DBEXT//db/files}"
for repo in $repos; do
- REPO_DB_FILE="${repo}$FILESEXT"
+ FILES_DB_FILE="${repo}$FILESEXT"
for arch in ${ARCHES[@]}; do
cd "$reposdir"
@@ -38,9 +38,9 @@ for repo in $repos; do
cached="no"
# extract old file archive
- if [ -f "${targetdir}/${repodir}/${REPO_DB_FILE}" ]; then
+ if [ -f "${targetdir}/${repodir}/${FILES_DB_FILE}" ]; then
mkdir -p "${CACHEDIR}/${repodir}"
- bsdtar -xf "${targetdir}/${repodir}/${REPO_DB_FILE}" -C "${CACHEDIR}/${repodir}"
+ bsdtar -xf "${targetdir}/${repodir}/${FILES_DB_FILE}" -C "${CACHEDIR}/${repodir}"
cached="yes"
fi
@@ -64,13 +64,13 @@ for repo in $repos; do
# create new file archive
if [ "$cached" == "no" ]; then
# at least one package has changed, so let's rebuild the archive
-# echo "creating ${REPO_DB_FILE}/${arch}"
+# echo "creating ${FILES_DB_FILE}/${arch}"
pkgdir="${targetdir}/${repodir}"
mkdir -p "$pkgdir"
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=*${DBEXT//\.db/} -c${TAR_OPT}f "${pkgdir}/${REPO_DB_FILE}" *
+ [ -f "${pkgdir}/${FILES_DB_FILE}.old" ] && rm "${pkgdir}/${FILES_DB_FILE}.old"
+ [ -f "${pkgdir}/${FILES_DB_FILE}" ] && mv "${pkgdir}/${FILES_DB_FILE}" "${pkgdir}/${FILES_DB_FILE}.old"
+ bsdtar --exclude=*${DBEXT//\.db/} -c${TAR_OPT}f "${pkgdir}/${FILES_DB_FILE}" *
fi
done
done