summaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/bin/kmsync.sh58
1 files changed, 56 insertions, 2 deletions
diff --git a/build_tools/bin/kmsync.sh b/build_tools/bin/kmsync.sh
index 4308786..c15bef4 100755
--- a/build_tools/bin/kmsync.sh
+++ b/build_tools/bin/kmsync.sh
@@ -27,6 +27,7 @@ function sync_dirs {
#first bring down new changes from knoppmyth.net
unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE $LOCAL
+
if [ ! $? = 0 ]
then
echo "#######################################################"
@@ -43,11 +44,50 @@ function sync_dirs {
echo "-------------------------------------------------------"
echo "----------- Finished with $3 -----------"
echo "-------------------------------------------------------"
+}
+function source_sync () {
+ src_repo=$1
+ case $1 in
+ testing )
+ echo "updating source packages"
+ REMOTE_DIR=/mount/repository/repo/src_packages/core-testing
+ LOCAL=/data/pkg_repo/src_packages/core-testing
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+
+ REMOTE_DIR=/mount/repository/repo/src_packages/extra-testing
+ LOCAL=/data/pkg_repo/src_packages/extra-testing
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+ ;;
+
+ release )
+ echo "updating source packages"
+ REMOTE_DIR=/mount/repository/repo/src_packages/core
+ LOCAL=/data/pkg_repo/src_packages/core
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+
+ REMOTE_DIR=/mount/repository/repo/src_packages/extra
+ LOCAL=/data/pkg_repo/src_packages/extra
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+ ;;
+ chroot-devel )
+ echo "updating source packages"
+ REMOTE_DIR=/mount/repository/repo/src_packages/chroot-devel
+ LOCAL=/data/pkg_repo/src_packages/chroot-devel
+ unison km-down -logfile /tmp/unison-down.log -auto -batch -numericids ssh://reposync@knoppmyth.net/$REMOTE_DIR $LOCAL
+ ;;
+
+
+
+ *)
+ echo "need to know the source repository [testing|release|chroot-devel]"
+ exit 1
+ ;;
+esac
+}
-}
#---------------------------------------------------------------
if [ ! -d $UNISON ]
then
@@ -66,26 +106,40 @@ fi
+
+
clear
case $1 in
testing)
#sync_dirs $REMOTE $LOCAL
sync_dirs $REMOTE_DIR/$CARCH/core-testing $DOCROOT/core-testing core-testing
sync_dirs $REMOTE_DIR/$CARCH/extra-testing $DOCROOT/extra-testing extra-testing
+ source_sync testing
;;
release)
sync_dirs $REMOTE_DIR/$CARCH/core $DOCROOT/core core
sync_dirs $REMOTE_DIR/$CARCH/extra $DOCROOT/extra extra
+ source_sync release
;;
chroot-devel)
echo "will update chroot-devel"
sync_dirs $REMOTE_DIR/$CARCH/chroot-devel $DOCROOT/chroot-devel chroot-devel
+ source_sync chroot-devel
+ ;;
+
+ source)
+ if [ x = x$2 ]
+ then
+ echo "need to know the source repository [testing|release|chroot-devel]"
+ exit 1
+ fi
+ source_sync $2
;;
*)
echo "invalid options"
- echo "kmsync.sh (testing|release|chroot-devel) "
+ echo "kmsync.sh (testing|release|chroot-devel|source[testing|release|chroot-devel]) "
echo
echo "EX: kmsync.sh testing <= will sync the testing repo with km.net update the local database and resync with km.net"
#echo "kmsync.sh testing oneway <= will syncthe testing repo with km.net update the local database"