Commit 7a2f045b authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.56.0

parent 70dff585
...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +33,7 @@ SHAREDIR=$PROGDIR
# will replaced with /etc/eepm during install # will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc CONFIGDIR=$PROGDIR/../etc
EPMVERSION="3.55.8" EPMVERSION="3.56.0"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -48,12 +48,20 @@ fi ...@@ -48,12 +48,20 @@ fi
load_helper() load_helper()
{ {
local shieldname="loaded$(echo "$1" | sed -e 's|-||g')"
# already loaded
eval "test -n \"\$$shieldname\"" && debug "Already loaded $1" && return
local CMD="$SHAREDIR/$1" local CMD="$SHAREDIR/$1"
[ -r "$CMD" ] || fatal "Have no $CMD helper file" # do not use fatal() here, it can be initial state
[ -r "$CMD" ] || { echo "FATAL: Have no $CMD helper file" ; exit 1; }
eval "$shieldname=1"
# shellcheck disable=SC1090
. $CMD . $CMD
} }
# File bin/epm-sh-functions: # File bin/epm-sh-functions:
...@@ -272,7 +280,7 @@ subst_option() ...@@ -272,7 +280,7 @@ subst_option()
store_output() store_output()
{ {
# use make_temp_file from etersoft-build-utils # use make_temp_file from etersoft-build-utils
RC_STDOUT="$(mktemp)" RC_STDOUT="$(mktemp)" || fatal
local CMDSTATUS=$RC_STDOUT.pipestatus local CMDSTATUS=$RC_STDOUT.pipestatus
echo 1 >$CMDSTATUS echo 1 >$CMDSTATUS
#RC_STDERR=$(mktemp) #RC_STDERR=$(mktemp)
...@@ -303,7 +311,7 @@ epm() ...@@ -303,7 +311,7 @@ epm()
# run epm again to full initialization # run epm again to full initialization
local bashopt='' local bashopt=''
[ -n "$verbose" ] && bashopt='-x' [ -n "$debug" ] && bashopt='-x'
$CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@" $CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@"
} }
...@@ -313,7 +321,7 @@ sudoepm() ...@@ -313,7 +321,7 @@ sudoepm()
[ "$EPMMODE" = "pipe" ] && fatal "Can't use sudo epm call from the piped script" [ "$EPMMODE" = "pipe" ] && fatal "Can't use sudo epm call from the piped script"
local bashopt='' local bashopt=''
[ -n "$verbose" ] && bashopt='-x' [ -n "$debug" ] && bashopt='-x'
sudorun $CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@" sudorun $CMDSHELL $bashopt $PROGDIR/$PROGNAME --inscript "$@"
} }
...@@ -329,6 +337,18 @@ fatal() ...@@ -329,6 +337,18 @@ fatal()
exit 1 exit 1
} }
debug()
{
[ -n "$debug" ] || return
if [ -z "$TEXTDOMAIN" ] ; then
set_color $YELLOW >&2
echo -n "WARNING: " >&2
restore_color >&2
echo "$*" >&2
fi
}
warning() warning()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
...@@ -590,15 +610,21 @@ disabled_eget() ...@@ -590,15 +610,21 @@ disabled_eget()
$EGET "$@" $EGET "$@"
} }
disabled_erc()
{
__epm_assure_7zip()
{
# install 7zip in any case (can be used) # install 7zip in any case (can be used)
if is_command 7z || is_command 7za || is_command 7zr || is_command 7zz ; then if is_command 7z || is_command 7za || is_command 7zr || is_command 7zz ; then
: :
else else
epm install p7zip epm install p7zip
fi fi
}
disabled_erc()
{
__epm_assure_7zip
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_erc ] ; then if [ -s $SHAREDIR/tools_erc ] ; then
...@@ -876,6 +902,7 @@ subst() ...@@ -876,6 +902,7 @@ subst()
fi fi
check_core_commands() check_core_commands()
{ {
#which which >/dev/null || fatal "Can't find which command (which or debianutils package is missed?)" #which which >/dev/null || fatal "Can't find which command (which or debianutils package is missed?)"
......
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