svn commit: r399171 - head/Mk/Scripts
Bryan Drewery
bdrewery at FreeBSD.org
Tue Oct 13 00:03:12 UTC 2015
Author: bdrewery
Date: Tue Oct 13 00:03:10 2015
New Revision: 399171
URL: https://svnweb.freebsd.org/changeset/ports/399171
Log:
Follow-up r399170 with a script, ports_env.sh, that can be used for the purpose.
This will allow Poudriere to know if it is possible to use the feature or not
by the existence of the file.
Also fix quoting issues.
With hat: portmgr
Added:
head/Mk/Scripts/ports_env.sh (contents, props changed)
Modified:
head/Mk/Scripts/functions.sh
Modified: head/Mk/Scripts/functions.sh
==============================================================================
--- head/Mk/Scripts/functions.sh Mon Oct 12 23:41:36 2015 (r399170)
+++ head/Mk/Scripts/functions.sh Tue Oct 13 00:03:10 2015 (r399171)
@@ -159,7 +159,7 @@ validate_env() {
fi
}
-export_index_env() {
+export_ports_env() {
local export_vars make_cmd make_env var results value
validate_env MAKE PORTSDIR
@@ -192,7 +192,7 @@ export_index_env() {
"
for var in ${export_vars}; do
- make_cmd="${make_cmd}${make_cmd:+ }-V ${var}=\${${var}}"
+ make_cmd="${make_cmd}${make_cmd:+ }-V ${var}=\${${var}:Q}"
done
# Bring in all the vars, but not empty ones.
@@ -205,7 +205,7 @@ export_index_env() {
if [ -n "${value}" ]; then
export ${var}
- echo "export ${var}=${value}"
+ echo "export ${var}=\"${value}\""
fi
done
}
Added: head/Mk/Scripts/ports_env.sh
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/Mk/Scripts/ports_env.sh Tue Oct 13 00:03:10 2015 (r399171)
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+# MAINTAINER: portmgr at FreeBSD.org
+# $FreeBSD$
+
+if [ -z "${SCRIPTSDIR}" ]; then
+ echo "Must set SCRIPTSDIR" >&2
+ exit 1
+fi
+
+. ${SCRIPTSDIR}/functions.sh
+
+export_ports_env
More information about the svn-ports-all
mailing list