From 49fb4d75ea83dca2ed4653e8454c478c1fd0555a Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Tue, 18 Aug 2009 16:11:03 -0700 Subject: More removal of DB_COMPRESSION from cron jobs Remove dependance on makepkg.conf Signed-off-by: Aaron Griffin --- misc-scripts/ftpdir-cleanup | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'misc-scripts') diff --git a/misc-scripts/ftpdir-cleanup b/misc-scripts/ftpdir-cleanup index f64acfa..96407c0 100755 --- a/misc-scripts/ftpdir-cleanup +++ b/misc-scripts/ftpdir-cleanup @@ -7,16 +7,10 @@ fi reponame=$1 dest=$2 -DB_COMPRESSION='gz' ############################################################ -if [ ! -f "$(dirname $0)/../config" ]; then - echo "$(dirname $0)/../config not found! Aborting" - exit 1 -fi - -. "$(dirname $0)/../config" +. "$(dirname $0)/../db-functions" getpkgname() { local tmp @@ -52,16 +46,16 @@ for arch in ${ARCHES[@]}; do exit 1 fi - if [ ! -f "$ftppath/$reponame.db.tar.$DB_COMPRESSION" ]; then + if [ ! -f "$ftppath/$reponame$DBEXT" ]; then echo "" - echo "ERROR: The file \"$ftppath/$reponame.db.tar.$DB_COMPRESSION\" could not be found, aborting." + echo "ERROR: The file \"$ftppath/$reponame$DBEXT\" could not be found, aborting." echo "" exit 1 fi - if ! bsdtar xf "$ftppath/$reponame.db.tar.$DB_COMPRESSION"; then + if ! bsdtar xf "$ftppath/$reponame$DBEXT"; then echo "" - echo "ERROR: Command failed: bsdtar xf \"$ftppath/$reponame.db.tar.$DB_COMPRESSION\"" + echo "ERROR: Command failed: bsdtar xf \"$ftppath/$reponame$DBEXT\"" exit 1 fi -- cgit v1.2.3-24-g4f1b