summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2012-09-05 18:30:43 (GMT)
committerJames Meyer <james.meyer@operamail.com>2012-09-05 18:30:43 (GMT)
commit3002904ada68c272b0dbe5fc62be2f833c9f2630 (patch)
tree9474e9811e91d941ef639447057e544a6a93319c
parent8212680e79996335e7546ab3910effd0db26f233 (diff)
downloadlinhes_dev-3002904ada68c272b0dbe5fc62be2f833c9f2630.zip
remove old schell script mp
-rwxr-xr-xbuild_tools/bin/mp228
1 files changed, 0 insertions, 228 deletions
diff --git a/build_tools/bin/mp b/build_tools/bin/mp
deleted file mode 100755
index 08d7b89..0000000
--- a/build_tools/bin/mp
+++ /dev/null
@@ -1,228 +0,0 @@
-#!/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
-SRCPKGHOME=/data/pkg_repo/src_packages
-mydir=`pwd`
-repolist="core extra"
-cmdline=$@
-
-git_branch=`git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
-
-case $git_branch in
- "testing") PFIX="-testing" ;;
- "master" ) PFIX="" ;;
- * ) echo "can't determine which is in use";;
- esac
-
-
-#if [ x`basename $0` = xmpr ]
-#then
-# PFIX=""
-#else
-# PFIX="-testing"
-#fi
- ALL_OFF="$(tput sgr0)"
- BOLD="$(tput bold)"
- BLUE="${BOLD}$(tput setaf 4)"
- GREEN="${BOLD}$(tput setaf 2)"
- RED="${BOLD}$(tput setaf 1)"
- YELLOW="${BOLD}$(tput setaf 3)"
-
-plain() {
- local mesg=$1; shift
- printf "${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-msg() {
- local mesg=$1; shift
- printf "${GREEN}==>${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-msg() {
- local mesg=$1; shift
- printf "${BLUE} ->${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-warning() {
- local mesg=$1; shift
- printf "${YELLOW}==> $(gettext "WARNING:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-error() {
- local mesg=$1; shift
- printf "${RED}==> $(gettext "ERROR:")${ALL_OFF}${BOLD} ${mesg}${ALL_OFF}\n" "$@" >&2
-}
-
-
-function bump {
- msg x$cmdline | grep -q \\-b
- if [ $? = 0 ]
- then
- cmdline=`msg $cmdline|sed -e "s/-b//g"`
- i="PKGBUILD"
- #getting pkgrel number after =
- package_pkgrel=`cat $i | grep pkgrel= | cut -d'=' -f 2`
-
- #extract number before dot in pkgrel
- beforedot=`msg $package_pkgrel | cut -n -d'.' -f 1`
-
- #add 1 to pkgrel
- new_pkgrel=$[$beforedot+1]
-
- #write it back to PKGBUILD
- sed -i "s:pkgrel=${package_pkgrel}:pkgrel=${new_pkgrel}:g" $i
- msg "bumped $pkgname release from $package_pkgrel to $new_pkgrel"
- . PKGBUILD
- fi
- #defined below
-# TOTALPKG="$pkgname"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
- SRCPKG="$pkgname"-"$pkgver"-"$pkgrel".src.tar.gz
-
-}
-
-
-
-
-function find_repo {
- dirname=`dirname $mydir`
-
- echo $dirname|grep -q "extra"
- if [ $? = 0 ]
- then
- REPO=extra${PFIX}
- else
- REPO=core${PFIX}
- fi
- echo $dirname|grep -q "chroot-devel"
- if [ $? = 0 ]
- then
- REPO=chroot-devel
- fi
-
- echo $dirname|grep -q "mv-core"
- if [ $? = 0 ]
- then
- 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
- msg $REPO
-}
-
-
-function update-repo {
- cd $DOCROOT
- msg
- msg "DOCROOT=$DOCROOT"
- msg
- for i in ${pkgname[@]}
- do
- msg $i
- TOTALPKG="$i"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.gz
- if [ ! -e $PKGDEST/$TOTALPKG ]
- then
- TOTALPKG="$i"-"$pkgver"-"$pkgrel"-"$CARCH".pkg.tar.xz
- fi
- if [ ! -e $PKGDEST/$TOTALPKG ]
- then
- msg $PKGDEST/$TOTALPKG
- msg "Couldn't find the new package"
- exit 0
- fi
-
- #remove old package from local copy
- DELPKG="$i"-"$pkgver"-*-"$CARCH".pkg.tar.*z
- rm -fvI $DELPKG
- #copy in new package
- msg "############################################"
- msg "Updating $CARCH/$REPO with $TOTALPKG"
- cp -f $PKGDEST/$TOTALPKG .
- repo-add $DOCROOT/$REPO.db.tar.gz $DOCROOT/$TOTALPKG
- msg "############################################"
- done
- cd -
-
-}
-
-
-function update-src-pkg {
- msg "---------------------------------SRC-------------------------"
- DELPKG="$pkgname"-"$pkgver"-*.src.tar.*z
- msg "Removing old src pkg"
- if [ ! -d $PKGHOME/$REPO/$SRCPKG ]
- then
- msg "Creating src_pkg directory"
- mkdir -p $SRCPKGHOME/$REPO
- fi
- rm -vf $SRCPKGHOME/$REPO/$DELPKG
- msg "copying src_pkg to $SRCPKGHOME/$REPO"
- 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|cut -d" " -f2 |grep ^pkgname$`
- if [ $? = 0 ]
- then
- msg "#######################################"
- msg "$pkgname already exists in $i$PFIX"
- msg " "$out
- msg
-
- msg x$cmdline|grep -q \\-f
- if [ $? = 0 ]
- then
- msg "Force detected, making pkg anyhow"
- msg "#######################################"
- return
- else
- msg "#######################################"
- exit 2
- fi
- fi
- fi
- done
-
-}
-
-#MAIN PROGRAM
-find_repo
-dup_check
-bump
-
-makepkg --asroot $cmdline || exit 1
-msg "=============FINSHED CREATING PKG=================="
-if [ $arch = "any" ]
-then
- CARCH="any"
-fi
-msg "---------updating database ----------"
-update-repo #&& pacman -Sy
-msg "----------creating source package---------"
-makepkg -f --holdver --asroot --source --skipinteg && update-src-pkg
-
-
-
-