summaryrefslogtreecommitdiffstats
path: root/build_tools/bin/mp
diff options
context:
space:
mode:
authorJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
committerJames Meyer <James.meyer@operamail.com>2008-10-02 03:23:45 (GMT)
commit618d4ad515a93d1e48934be5846edd71270171ec (patch)
treea22a9294af81215d4a7b1053e5fdb4d746f39d41 /build_tools/bin/mp
downloadlinhes_dev-618d4ad515a93d1e48934be5846edd71270171ec.zip
initital import
Diffstat (limited to 'build_tools/bin/mp')
-rwxr-xr-xbuild_tools/bin/mp67
1 files changed, 67 insertions, 0 deletions
diff --git a/build_tools/bin/mp b/build_tools/bin/mp
new file mode 100755
index 0000000..c69c622
--- /dev/null
+++ b/build_tools/bin/mp
@@ -0,0 +1,67 @@
+#!/bin/bash
+# Used to compile a package and copy it to the correct repository location.
+# all arguments are passed to makepkg
+#
+#
+. /etc/makepkg.conf
+. PKGBUILD
+PKGHOME=/data/pkg_repo/packages
+mydir=`pwd`
+TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
+
+
+if [ x`basename $0` = xmpr ]
+then
+ PFIX=""
+else
+ PFIX="-testing"
+fi
+
+
+
+
+function find_repo {
+ echo $mydir|grep -q "extra"
+ if [ $? = 0 ]
+ then
+ REPO=extra${PFIX}
+ else
+ REPO=core${PFIX}
+ fi
+ DOCROOT=/data/pkg_repo/$CARCH/$REPO
+}
+
+
+function update-repo {
+
+
+ cd $DOCROOT
+ echo
+ echo "DOCROOT=$DOCROOT"
+ echo
+ #remove old package from local copy
+ DELPKG="$pkgname"-"$pkgver"-*-"$CARCH".pkg.tar.gz
+ #echo $DOCROOT
+ #echo $DELPKG
+ echo "Removing old packages from:"
+ rm -fvI $DELPKG
+ #copy in new package
+ echo
+ echo "Updating $CARCH/$REPO with $TOTALPKG"
+ cp -f $PKGDEST/$TOTALPKG .
+ repo-add $DOCROOT/$REPO.db.tar.gz $DOCROOT/$TOTALPKG
+ cd -
+
+}
+
+
+
+
+
+
+find_repo
+
+makepkg --holdver --asroot $@ || exit 1
+echo "---------updating database ----------"
+update-repo #&& pacman -Sy
+