summaryrefslogtreecommitdiffstats
path: root/build_tools
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/bin/mp29
1 files changed, 26 insertions, 3 deletions
diff --git a/build_tools/bin/mp b/build_tools/bin/mp
index 884fece..5ff295d 100755
--- a/build_tools/bin/mp
+++ b/build_tools/bin/mp
@@ -10,6 +10,7 @@ SRCPKGHOME=/data/pkg_repo/src_packages
mydir=`pwd`
TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
SRCPKG="$pkgname"-"$pkgver"-"$pkgrel".src.tar.gz
+repolist="core extra"
if [ x`basename $0` = xmpr ]
then
@@ -57,8 +58,6 @@ function find_repo {
function update-repo {
-
-
cd $DOCROOT
echo
echo "DOCROOT=$DOCROOT"
@@ -92,11 +91,35 @@ function update-src-pkg {
cp -f $PKGHOME/$SRCPKG $SRCPKGHOME/$REPO
}
+function dup_check {
+ if [ $REPO = "local" -o $REPO = "mv-core" ]
+ then
+ return
+ fi
+
+ for i in $repolist
+ do
+ if [ ! $i$PFIX = $REPO ]
+ then
+ out=`pacman -Sl $i$PFIX|grep $pkgname`
+ if [ $? = 0 ]
+ then
+ echo "#######################################"
+ echo "$pkgname already exists in $i$PFIX"
+ echo " "$out
+ echo
+ echo "#######################################"
+ exit 2
+ fi
+ fi
+ done
+
+}
#MAIN PROGRAM
find_repo
-
+dup_check
makepkg --asroot $@ || exit 1
echo "---------updating database ----------"
update-repo #&& pacman -Sy