From 9076b4bbce102a80a9840cb418920826d70acd7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 18 Nov 2016 14:01:23 +0100 Subject: [PATCH] config/functions: add get_pkg_version helper function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- config/functions | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/functions b/config/functions index e52cbec6ec..1f75d05eeb 100644 --- a/config/functions +++ b/config/functions @@ -139,6 +139,14 @@ get_build_dir() { fi } +get_pkg_version() { + if [ ! -z $1 ] ; then + cd $ROOT + . config/options $1 + echo "$PKG_VERSION" + fi +} + tolower(){ echo "$@" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz }