]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: hydra_yaml_param expression
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 25 May 2020 18:13:40 +0000 (15:13 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 25 May 2020 18:13:40 +0000 (15:13 -0300)
lib/hydra/deploy

index 3335686b48d7eaf3a02cf61b7b05264d6501a258..713a53e2a664634c8ed2ee3db8d21149c579a04d 100644 (file)
@@ -130,8 +130,9 @@ function hydra_yaml_param {
   local param="$1"
   local file="$2"
 
-  #grep "^$param: " $file | cut -d ' ' -f 2 | sed -e "s/'//g" -e 's/"//g'
-  grep "^$param" $file | sed -e "s/^$param//" | cut -d ':' -f 2 | sed -e "s/'//g" -e 's/"//g' -e "s/ //g" 
+  #grep "^$param: "   $file | cut -d ' ' -f 2 | sed -e "s/'//g" -e 's/"//g'
+  #grep "^$param"     $file | sed -e "s/^$param//"  | cut -d ':' -f 2 | sed -e "s/'//g" -e 's/"//g' -e "s/ //g" 
+  grep "^$param:[^:]" $file | sed -e "s/^$param://" | sed -e "s/'//g" -e 's/"//g' -e "s/ //g"
 }
 
 # Create puppet folder structure