summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/create-filelists4
-rwxr-xr-xcron-jobs/ftpdir-cleanup8
-rwxr-xr-xcron-jobs/sourceballs2
3 files changed, 6 insertions, 8 deletions
diff --git a/cron-jobs/create-filelists b/cron-jobs/create-filelists
index 8c354fc..9249408 100755
--- a/cron-jobs/create-filelists
+++ b/cron-jobs/create-filelists
@@ -23,7 +23,7 @@ case "${DBEXT}" in
*.gz) TAR_OPT="z" ;;
*.bz2) TAR_OPT="j" ;;
*.xz) TAR_OPT="J" ;;
- *) echo "Unknown compression type for DBEXT=${DBEXT}" && exit 1 ;;
+ *) die "Unknown compression type for DBEXT=${DBEXT}" ;;
esac
FILESEXT="${DBEXT//db/files}"
@@ -42,7 +42,7 @@ for repo in ${repos[@]}; do
mkdir -p "${DBDIR}/${repodir}"
bsdtar -xf "${targetdir}/${repodir}/${REPO_DB_FILE}" -C "${DBDIR}/${repodir}"
else
- echo "Fail! Does the repo $repo with arch $arch even exist?"
+ error "Fail! Does the repo $repo with arch $arch even exist?"
continue
fi
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 7668ab5..3456e9c 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -29,13 +29,11 @@ done
popd >/dev/null
if [ -n "$to_cleanup" ]; then
- echo " The following packages are no longer in any repo"
- echo " They will be moved to $CLEANUP_DESTDIR"
+ msg "The following packages are no longer in any repo"
for f in $to_cleanup; do
- echo " $(basename "$f")"
+ msg2 "$(basename "$f")"
done
- echo ""
- mv $to_cleanup "$CLEANUP_DESTDIR"
+ ${CLEANUP_DRYRUN} || mv $to_cleanup "$CLEANUP_DESTDIR"
fi
script_unlock
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index 78c3959..b82e375 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -22,7 +22,7 @@ for repo in ${repos[@]}; do
for arch in ${ARCHES[@]} any; do
ftppath="$ftpbase/$repo/os/$arch"
if [ ! -d "$ftppath" ]; then
- echo "FTP path does not exist: $ftppath" >2
+ error "FTP path does not exist: $ftppath"
continue
fi
cd $ftppath