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