Commit 02dce4d5 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.64.56

parent e8b99ffd
......@@ -34,7 +34,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.64.55"
EPMVERSION="3.64.56"
# package, single (file), pipe, git
EPMMODE="package"
......@@ -464,7 +464,7 @@ fixme()
debug()
{
[ -n "$debug" ] || return
[ -z "$debug" ] && return
set_color $YELLOW >&2
echog -n "WARNING: " >&2
......@@ -1447,6 +1447,21 @@ else
}
fi
yaml_load_vars()
{
local file="$1"
shift
local data field value
data="$(epm tool yaml "$file" 2>/dev/null)"
for field in "$@" ; do
value="$(printf '%s\n' "$data" | grep "^${field}=" | head -n1 | sed "s/^[^=]*=\"\(.*\)\"$/\1/")"
# skip if key is not present in yaml (preserve existing value)
[ -n "$value" ] || continue
# Use single quotes to prevent command execution in values
eval "$field='$(printf '%s' "$value" | sed "s/'/'\\\\''/g")'"
done
}
# File bin/serv-cat:
serv_cat()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment