fix set cmd

This commit is contained in:
creme 2019-09-06 02:26:35 +02:00
parent 303b41a83d
commit d655af6288
No known key found for this signature in database
GPG Key ID: C147C3B7FBDF08D0
1 changed files with 1 additions and 1 deletions

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"