From 15ec3eb14ba833e671cc8b84ae47db55b9c6cf07 Mon Sep 17 00:00:00 2001 From: James Meyer Date: Sat, 10 Jan 2009 13:58:10 -0600 Subject: switch back to using unison. This time it will force an update with the assumption the local pkg.db.tar.gz is always correct. --- build_tools/bin/km-up.prf | 2 +- build_tools/bin/kmsync.sh | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/build_tools/bin/km-up.prf b/build_tools/bin/km-up.prf index 9fa6ce4..73a3cf9 100644 --- a/build_tools/bin/km-up.prf +++ b/build_tools/bin/km-up.prf @@ -3,4 +3,4 @@ ignore = Name .*~ ignore = Name *.o ignore = Name *.tmp - ignore = Name *.db.tar.gz.old + ignore = Name *.pkg.tar.gz diff --git a/build_tools/bin/kmsync.sh b/build_tools/bin/kmsync.sh index f8e9168..6da7f11 100755 --- a/build_tools/bin/kmsync.sh +++ b/build_tools/bin/kmsync.sh @@ -14,10 +14,10 @@ fi cwd=`dirname $0` REMOTE_DIR=/mount/repository/repo DOCROOT=/data/pkg_repo/$CARCH - #export UNISON="/root/.unison" export UNISON="/data/pkg_repo/.unison" - +cp -f /build_tools/bin/km-up.prf $UNISON/km-up.prf +cp -f /build_tools/bin/km-down.prf $UNISON/km-down.prf function sync_dirs { REMOTE=$1 LOCAL=$2 @@ -26,6 +26,11 @@ function sync_dirs { echo "________________________________________________________" #first bring down new changes from knoppmyth.net + echo "--------" + echo + echo "Syncing the packages with knoppmyth.net" + echo + echo "--------" unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE $LOCAL if [ ! $? = 0 ] @@ -40,8 +45,13 @@ function sync_dirs { update_db_repo.sh $LOCAL $3 #push the database back + echo "--------" + echo echo "Pushing the pkg database to knoppmyth.net" - scp $LOCAL/*.db.tar.gz reposync@knoppmyth.net:$REMOTE/ + echo + echo "--------" + unison km-up -logfile /tmp/unison-up.log -auto -batch -numericids -force $LOCAL $LOCAL ssh://reposync@knoppmyth.net/$REMOTE + #scp $LOCAL/*.db.tar.gz reposync@knoppmyth.net:$REMOTE/ echo "-------------------------------------------------------" echo "----------- Finished with $3 -----------" -- cgit v0.12