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/mp | |
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/mp')
-rwxr-xr-x | build_tools/bin/mp | 31 |
1 files changed, 29 insertions, 2 deletions
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 + + + |