Sha256: ff6eeb3f7735dccb457e12993a36165fca9d400323ad489fbe31a422f201746f

Contents?: true

Size: 362 Bytes

Versions: 27

Compression:

Stored size: 362 Bytes

Contents

# helper to build the set VAR cmd
def build_set_var_cmd(vars_file, key, value)
  puts "#{vars_file} #{key} #{value}"
  cmd = "if awk < #{vars_file} -F= '{print $1}' | grep --quiet -w #{key}; then "
  cmd += "sed -i 's/^#{key}=.*/#{key}=#{value.gsub("\/", "\\/")}/g' #{vars_file};"
  cmd += "else echo '#{key}=#{value}' >> #{vars_file};"
  cmd += "fi"
  cmd
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
negroku-2.8.6 lib/negroku/helpers/env.rb
negroku-2.8.5 lib/negroku/helpers/env.rb
negroku-2.8.4 lib/negroku/helpers/env.rb
negroku-2.8.3 lib/negroku/helpers/env.rb
negroku-2.8.2 lib/negroku/helpers/env.rb
negroku-2.8.1 lib/negroku/helpers/env.rb
negroku-2.8.0 lib/negroku/helpers/env.rb
negroku-2.7.1 lib/negroku/helpers/env.rb
negroku-2.7.0 lib/negroku/helpers/env.rb
negroku-2.6.0 lib/negroku/helpers/env.rb
negroku-2.5.5 lib/negroku/helpers/env.rb
negroku-2.5.4 lib/negroku/helpers/env.rb
negroku-2.5.3 lib/negroku/helpers/env.rb
negroku-2.5.2 lib/negroku/helpers/env.rb
negroku-2.5.1 lib/negroku/helpers/env.rb
negroku-2.5.0 lib/negroku/helpers/env.rb
negroku-2.4.2 lib/negroku/helpers/env.rb
negroku-2.4.1 lib/negroku/helpers/env.rb
negroku-2.4.0 lib/negroku/helpers/env.rb
negroku-2.3.5 lib/negroku/helpers/env.rb