From 83f46bda07b272f3188329527030d3f2e16dc335 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Wed, 21 Sep 2016 12:47:29 -0400 Subject: removing unused bash parser functions Change-Id: I694e057544097d59b9974fe6fc9ad269a5b180b6 Signed-off-by: Dan Radez --- lib/parse-functions.sh | 40 ---------------------------------------- 1 file changed, 40 deletions(-) (limited to 'lib') diff --git a/lib/parse-functions.sh b/lib/parse-functions.sh index ef388f44..87453ea3 100755 --- a/lib/parse-functions.sh +++ b/lib/parse-functions.sh @@ -10,46 +10,6 @@ # Parser functions used by OPNFV Apex -##translates yaml into variables -##params: filename, prefix (ex. "config_") -##usage: parse_yaml opnfv_ksgen_settings.yml "config_" -parse_yaml() { - local prefix=$2 - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\)\($w\)$s:$s\"\(.*\)\"$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i