[PKG-Openstack-devel] [PATCH] Add a shell wrapper script for pkgos_inifile().
Turbo Fredriksson
turbo at bayour.com
Mon Jul 4 13:22:25 UTC 2016
I find this extremely useful. Please provide this.
---
build-tools/openstack-configure | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100755 build-tools/openstack-configure
diff --git a/build-tools/openstack-configure b/build-tools/openstack-configure
new file mode 100755
index 0000000..8dcd8c8
--- /dev/null
+++ b/build-tools/openstack-configure
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# By default, be verbose.
+export PKGOS_VERBOSE=yes
+
+if [ ! -f "/usr/share/openstack-pkg-tools/pkgos_func" ]; then
+ echo "ERROR: openstack-pkg-tools missing"
+ exit 1
+fi
+
+. /usr/share/openstack-pkg-tools/pkgos_func
+
+# If we're getting, we can't be verbose, because
+# we'll returning "pkgos_inifile: Getting value in ..."
+[ "${1}" = "get" ] && export PKGOS_VERBOSE=no
+
+pkgos_inifile $*
+
+if [ "${1}" = "get" -a -n "${RET}" -a "${RET}" != "NOT_FOUND" ]
+then
+ echo "${RET}"
+fi
--
1.7.10.4
More information about the Openstack-devel
mailing list