[Midnightbsd-cvs] mports [17429] trunk: move dialog4ports.sh
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sat Sep 20 11:58:41 EDT 2014
Revision: 17429
http://svnweb.midnightbsd.org/mports/?rev=17429
Author: laffer1
Date: 2014-09-20 11:58:41 -0400 (Sat, 20 Sep 2014)
Log Message:
-----------
move dialog4ports.sh
Added Paths:
-----------
trunk/Mk/scripts/
trunk/Mk/scripts/dialog4ports.sh
Removed Paths:
-------------
trunk/Tools/scripts/dialog4ports.sh
Copied: trunk/Mk/scripts/dialog4ports.sh (from rev 17422, trunk/Tools/scripts/dialog4ports.sh)
===================================================================
--- trunk/Mk/scripts/dialog4ports.sh (rev 0)
+++ trunk/Mk/scripts/dialog4ports.sh 2014-09-20 15:58:41 UTC (rev 17429)
@@ -0,0 +1,47 @@
+#!/bin/sh
+# $MidnightBSD: mports/Tools/scripts/dialog4ports.sh,v 1.1 2013/03/30 12:05:44 laffer1 Exp $
+set -e
+
+if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then
+ echo "DIALOG4PORTS, MAKE and PORTSDIR required in environment." >&2
+ exit 1
+fi
+
+: ${DIALOGPORT:=ports-mgmt/dialog4ports}
+: ${DIALOGNAME:=dialog4ports}
+
+OPTIONSFILE="$1"
+
+if ! [ -e $DIALOG4PORTS ]; then
+ # If INSTALL_AS_USER is set then just build and use the WRKDIR version
+ # Also do this if PREFIX!=LOCALBASE to avoid missing file or double
+ # installs
+ if [ -n "${INSTALL_AS_USER}" -o "${PREFIX}" != "${LOCALBASE}" ]; then
+ if ! [ -d "${PORTSDIR}/${DIALOGPORT}" ]; then
+ echo "===> Skipping 'config' as ${DIALOGPORT} is not checked out" >&2
+ exit 1
+ fi
+ DIALOG4PORTS=$(${MAKE} -C ${PORTSDIR}/${DIALOGPORT} -V DIALOG4PORTS)
+ if ! [ -e "${DIALOG4PORTS}" ]; then
+ echo "===> Building ${DIALOGNAME} as it is required for the config dialog"
+ env - ${MAKE} -C ${PORTSDIR}/${DIALOGPORT} -D NO_DIALOG clean build
+ fi
+ else
+ # Build+install through su-install as normal
+ echo "===> Building/installing ${DIALOGNAME} as it is required for the config dialog"
+ cd ${PORTSDIR}/${DIALOGPORT} && env - ${MAKE} -DNO_DIALOG clean install
+ # Need to clean again as it can't run twice in 1 call above
+ cd ${PORTSDIR}/${DIALOGPORT} && env - ${MAKE} clean
+ fi
+fi
+
+# Backwards compat with older version which used stdout [<= 0.1.1] (or stderr [0.1.2]).
+# Clear environment of PKGNAME or the dialog will show on older versions
+# that do not understand -v.
+if ! env -u PKGNAME ${DIALOG4PORTS} -v > /dev/null 2>&1; then
+ exec $DIALOG4PORTS > $OPTIONSFILE 2>&1
+fi
+
+# Newer versions use stderr to work around a jail issue
+# http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082383.html
+exec $DIALOG4PORTS 2> $OPTIONSFILE
Deleted: trunk/Tools/scripts/dialog4ports.sh
===================================================================
--- trunk/Tools/scripts/dialog4ports.sh 2014-09-20 15:58:02 UTC (rev 17428)
+++ trunk/Tools/scripts/dialog4ports.sh 2014-09-20 15:58:41 UTC (rev 17429)
@@ -1,47 +0,0 @@
-#!/bin/sh
-# $MidnightBSD: mports/Tools/scripts/dialog4ports.sh,v 1.1 2013/03/30 12:05:44 laffer1 Exp $
-set -e
-
-if [ -z "${DIALOG4PORTS}" -o -z "${PORTSDIR}" -o -z "${MAKE}" ]; then
- echo "DIALOG4PORTS, MAKE and PORTSDIR required in environment." >&2
- exit 1
-fi
-
-: ${DIALOGPORT:=ports-mgmt/dialog4ports}
-: ${DIALOGNAME:=dialog4ports}
-
-OPTIONSFILE="$1"
-
-if ! [ -e $DIALOG4PORTS ]; then
- # If INSTALL_AS_USER is set then just build and use the WRKDIR version
- # Also do this if PREFIX!=LOCALBASE to avoid missing file or double
- # installs
- if [ -n "${INSTALL_AS_USER}" -o "${PREFIX}" != "${LOCALBASE}" ]; then
- if ! [ -d "${PORTSDIR}/${DIALOGPORT}" ]; then
- echo "===> Skipping 'config' as ${DIALOGPORT} is not checked out" >&2
- exit 1
- fi
- DIALOG4PORTS=$(${MAKE} -C ${PORTSDIR}/${DIALOGPORT} -V DIALOG4PORTS)
- if ! [ -e "${DIALOG4PORTS}" ]; then
- echo "===> Building ${DIALOGNAME} as it is required for the config dialog"
- env - ${MAKE} -C ${PORTSDIR}/${DIALOGPORT} -D NO_DIALOG clean build
- fi
- else
- # Build+install through su-install as normal
- echo "===> Building/installing ${DIALOGNAME} as it is required for the config dialog"
- cd ${PORTSDIR}/${DIALOGPORT} && env - ${MAKE} -DNO_DIALOG clean install
- # Need to clean again as it can't run twice in 1 call above
- cd ${PORTSDIR}/${DIALOGPORT} && env - ${MAKE} clean
- fi
-fi
-
-# Backwards compat with older version which used stdout [<= 0.1.1] (or stderr [0.1.2]).
-# Clear environment of PKGNAME or the dialog will show on older versions
-# that do not understand -v.
-if ! env -u PKGNAME ${DIALOG4PORTS} -v > /dev/null 2>&1; then
- exec $DIALOG4PORTS > $OPTIONSFILE 2>&1
-fi
-
-# Newer versions use stderr to work around a jail issue
-# http://lists.freebsd.org/pipermail/freebsd-ports/2013-March/082383.html
-exec $DIALOG4PORTS 2> $OPTIONSFILE
More information about the Midnightbsd-cvs
mailing list