diff options
author | Cecil Hugh Watson <knoppmyth@gmail.com> | 2008-12-02 09:01:33 (GMT) |
---|---|---|
committer | Cecil Hugh Watson <knoppmyth@gmail.com> | 2008-12-02 09:01:33 (GMT) |
commit | 56b0ac3ddfdc91139fcbe0e11dc946978ae04a42 (patch) | |
tree | 6239df4065119b5b7de9c489e16f80022ca900e2 /build_tools/bin | |
parent | 597d7a7a5383da4ba6ec9866e0b70962b68b2417 (diff) | |
parent | 699d87c76662d820f97a6c4b0ab151fac849770b (diff) | |
download | linhes_dev-56b0ac3ddfdc91139fcbe0e11dc946978ae04a42.zip |
Merge branch 'HEAD' of ssh://cesman@knoppmyth.net/mount/repository/LinHES-dev
Diffstat (limited to 'build_tools/bin')
-rwxr-xr-x | build_tools/bin/kmsync.sh | 58 | ||||
-rwxr-xr-x | build_tools/bin/mp | 31 | ||||
l--------- | build_tools/bin/mpl | 1 |
3 files changed, 86 insertions, 4 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" diff --git a/build_tools/bin/mp b/build_tools/bin/mp index 76c08ea..102454e 100755 --- a/build_tools/bin/mp +++ b/build_tools/bin/mp @@ -6,9 +6,10 @@ . /etc/makepkg.conf . PKGBUILD PKGHOME=/data/pkg_repo/packages +SRCPKGHOME=/data/pkg_repo/src_packages mydir=`pwd` TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz - +SRCPKG="$pkgname"-"$pkgver"-"$pkgrel".src.tar.gz if [ x`basename $0` = xmpr ] then @@ -20,6 +21,7 @@ fi + function find_repo { echo $mydir|grep -q "extra" if [ $? = 0 ] @@ -40,7 +42,15 @@ function find_repo { REPO=mv-core fi + if [ x`basename $0` = xmpl ] + then + REPO="local" + fi DOCROOT=/data/pkg_repo/$CARCH/$REPO + if [ ! -e $DOCROOT ] + then + mkdir -p $DOCROOT + fi } @@ -67,13 +77,30 @@ function update-repo { } +function update-src-pkg { + DELPKG="$pkgname"-"$pkgver"-*.src.tar.gz + echo "Removing old src pkg" + if [ ! -d $PKGHOME/$REPO/$SRCPKG ] + then + echo "Creating src_pkg directory" + mkdir -p $SRCPKGHOME/$REPO + fi + rm -vf $SRCPKGHOME/$REPO/$DELPKG + echo "copying src_pkg to $SRCPKGHOME/$REPO" + cp -f $PKGHOME/$SRCPKG $SRCPKGHOME/$REPO +} - +#MAIN PROGRAM find_repo makepkg --holdver --asroot $@ || exit 1 echo "---------updating database ----------" update-repo #&& pacman -Sy +echo "----------creating source package---------" +makepkg -f --holdver --asroot --source && update-src-pkg + + + diff --git a/build_tools/bin/mpl b/build_tools/bin/mpl new file mode 120000 index 0000000..691afc3 --- /dev/null +++ b/build_tools/bin/mpl @@ -0,0 +1 @@ +mp
\ No newline at end of file |