fix set cmd

This commit is contained in:
creme
2019-09-06 02:26:35 +02:00
parent 303b41a83d
commit d655af6288

2
envs
View File

@@ -287,7 +287,7 @@ case "$1" in
;;
set)
if [ -z "$(cat < "$INFO_FILE" | sed -n /^"$2"/p)" ]; then
if [ -z "$(cat < "$INFO_FILE" | sed -n /^"$2"=/p)" ]; then
echo "${2}=${3}" >> "$INFO_FILE"
else
sed -i "s#${2}=.*#${2}=${3}#" "$INFO_FILE"