Sha256: 71d02f31c317166022aa0c8792e69fb31e18e8dac9997483fc36eda3fef6dc10
Contents?: true
Size: 362 Bytes
Versions: 9
Compression:
Stored size: 362 Bytes
Contents
# helper to build the add VAR cmd def build_add_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
9 entries across 9 versions & 1 rubygems