mirror of https://git.envs.net/envs/ops.git
envs_user_info.sh: fix remove leading and trailing string
This commit is contained in:
parent
a5653d56d6
commit
8d414b6b05
|
@ -96,6 +96,8 @@ EOM
|
||||||
# desc
|
# desc
|
||||||
if [ -f "$INFO_FILE" ]; then
|
if [ -f "$INFO_FILE" ]; then
|
||||||
desc="$(sed -n '/^desc=/{s#^.*=##;p}' "$INFO_FILE")"
|
desc="$(sed -n '/^desc=/{s#^.*=##;p}' "$INFO_FILE")"
|
||||||
|
# remove leading and trailing `"`
|
||||||
|
desc="$(echo "$desc" | sed -e '$ s/^"//' -e '$ s/"$//')"
|
||||||
if [ -z "$desc" ] || [ "$desc" == 'a short describtion or message' ]; then
|
if [ -z "$desc" ] || [ "$desc" == 'a short describtion or message' ]; then
|
||||||
cat << EOM >> "$TMP_JSON"
|
cat << EOM >> "$TMP_JSON"
|
||||||
"desc": "",
|
"desc": "",
|
||||||
|
|
Loading…
Reference in New Issue