Commit beff3300 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: allow use $EGET in prescription scripts

parent eed9af82
......@@ -36,6 +36,9 @@ if [ ! -x "$script" ] ; then
fatal "Can't find $script prescription."
fi
# allow use EGET in the scripts
__set_EGET
info "Running $($script --description) ..."
docmd $script --run
......
......@@ -383,6 +383,20 @@ assure_exists()
( direct='' epm_assure "$1" $package $3 ) || fatal "Can't assure in '$1' command from $package$textpackage package"
}
__set_EGET()
{
# use internal eget only if exists
if [ -s $SHAREDIR/tools_eget ] ; then
export EGET="$SHAREDIR/tools_eget"
return
fi
# FIXME: we need disable output here, eget can be used for get output
assure_exists eget >/dev/null
# use external command, not the function
export EGET="$(which eget)" || fatal "Missed command eget from installed package eget"
}
# will replaced within disabled_eget in packaged version
eget()
{
......
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