[PC-BSD Commits] r3962 - pbibuild/pbibuilder/scripts

svn at pcbsd.org svn at pcbsd.org
Mon May 18 06:56:38 PDT 2009


Author: kris
Date: 2009-05-18 06:56:38 -0700 (Mon, 18 May 2009)
New Revision: 3962

Modified:
   pbibuild/pbibuilder/scripts/3.1.makeinmate.sh
Log:

Updated our makeinmate.sh script, now should detect version information properly



Modified: pbibuild/pbibuilder/scripts/3.1.makeinmate.sh
===================================================================
--- pbibuild/pbibuilder/scripts/3.1.makeinmate.sh	2009-05-18 13:53:44 UTC (rev 3961)
+++ pbibuild/pbibuilder/scripts/3.1.makeinmate.sh	2009-05-18 13:56:38 UTC (rev 3962)
@@ -1,14 +1,16 @@
-#!/bin/bash
+#!/bin/sh
 # Make an inmate file from a configured directory
 ######################################################################
 HOME="/root" ; export HOME
 
 # Check if we have sourced the variables yet
-if [ "${PROGDIR}" == "" ]
+if [ "${PROGDIR}" = "" ]
 then
   . /pbi-build/conf/pbibuild.conf
 fi
 
+# Source our functions
+. ${PROGDIR}/scripts/functions.sh
 
 if [ -z ${PROGDIR} ]
 then
@@ -52,47 +54,9 @@
 MODULEDIR="${PROGDIR}/modules/${module}" ; export MODULEDIR
 BLOG="${OUTDIR}/build.log" ; export BLOG
 
+# Run our function to find the port version
+find_port_ver
 
-# Check if we have a custom version string key and try to set PORTVER
-if [ ! -z "${VERKEY}" ]
-then
- # Now try the supplied VERKEY strings
- PORTVER="`grep $VERKEY ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`"
-fi
-
-if [ -z "${PORTVER}" ]
-then
- # Get the port version number
- PORTVER="`grep DISTVERSION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`"
-fi
-
-if [ -z "${PORTVER}" ]
-then
-
- # Now try the PORTVERSION= line
- PORTVER="`grep PORTVERSION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`" 
- if [ -z "$PORTVER" -o "${PORTVER}" = " " ]
- then
-   PORTVER="`grep PORTVERSION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 3`" 
- fi
-
-fi
-
-if [ -z "${PORTVER}" ]
-then
- # Now try the DISTVERSION?= line
- PORTVER="`grep DISTVERSION?= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`"
-fi
-
-
-# Check if we have a portrevision to use in version number
-cat ${PDESTDIR}/${PBIPORT}/Makefile | grep "PORTREVISION="
-if [ "$?" = "0" ]
-then
-  PORTREV="`grep PORTREVISION= ${PDESTDIR}/${PBIPORT}/Makefile | cut -f 2`" 
-  PORTVER="${PORTVER}_${PORTREV}" ; export PORTVER
-fi
-
 if [ ! -z "${INMATEVER}" ]
 then
    echo "Using set INMATEVER"



More information about the Commits mailing list