Commit cc8b91f6 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.53.2

parent 25bcb25a
...@@ -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.53.1" EPMVERSION="3.53.2"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -331,9 +331,10 @@ sudoepm() ...@@ -331,9 +331,10 @@ sudoepm()
fatal() fatal()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
set_color $RED set_color $RED >&2
echo "Error: $* (you can discuss the epm $EPMVERSION problem in Telegram: https://t.me/useepm)" >&2 echo -n "ERROR: " >&2
restore_color restore_color >&2
echo "$* (you can discuss the epm $EPMVERSION problem in Telegram: https://t.me/useepm)" >&2
fi fi
exit 1 exit 1
} }
...@@ -341,9 +342,10 @@ fatal() ...@@ -341,9 +342,10 @@ fatal()
warning() warning()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
set_color $YELLOW set_color $YELLOW >&2
echo "Warning: $*" >&2 echo -n "WARNING: " >&2
restore_color restore_color >&2
echo "$*" >&2
fi fi
} }
...@@ -538,13 +540,12 @@ disabled_eget() ...@@ -538,13 +540,12 @@ disabled_eget()
disabled_erc() disabled_erc()
{ {
if ! is_command patool ; then # 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
fi
# use internal eget only if exists # use internal eget only if exists
if [ -s $SHAREDIR/tools_erc ] ; then if [ -s $SHAREDIR/tools_erc ] ; then
...@@ -731,8 +732,12 @@ __epm_remove_from_tmp_files() ...@@ -731,8 +732,12 @@ __epm_remove_from_tmp_files()
{ {
keep="$1" keep="$1"
[ -r "$keep" ] || return 0 [ -r "$keep" ] || return 0
[ -n "$to_remove_pkg_files" ] || return 0 if [ -n "$to_remove_pkg_files" ] ; then
to_remove_pkg_files="$(echo "$to_remove_pkg_files" | sed -e "s|$keep||")" to_remove_pkg_files="$(echo "$to_remove_pkg_files" | sed -e "s|$keep||")"
fi
if [ -n "$to_remove_tmp_files" ] ; then
to_remove_tmp_files="$(echo "$to_remove_tmp_files" | sed -e "s|$keep||")"
fi
} }
__epm_remove_tmp_files() __epm_remove_tmp_files()
...@@ -741,6 +746,7 @@ __epm_remove_tmp_files() ...@@ -741,6 +746,7 @@ __epm_remove_tmp_files()
if [ -z "$DEBUG" ] ; then if [ -z "$DEBUG" ] ; then
# TODO: reinvent # TODO: reinvent
[ -n "$to_remove_pkg_files" ] && rm -f $to_remove_pkg_files [ -n "$to_remove_pkg_files" ] && rm -f $to_remove_pkg_files
[ -n "$to_remove_tmp_files" ] && rm -f $to_remove_tmp_files
# hack?? # hack??
[ -n "$to_remove_pkg_files" ] && rmdir $(dirname $to_remove_pkg_files | head -n1) 2>/dev/null [ -n "$to_remove_pkg_files" ] && rmdir $(dirname $to_remove_pkg_files | head -n1) 2>/dev/null
[ -n "$to_remove_pkg_dirs" ] && rmdir $to_remove_pkg_dirs 2>/dev/null [ -n "$to_remove_pkg_dirs" ] && rmdir $to_remove_pkg_dirs 2>/dev/null
...@@ -750,6 +756,19 @@ __epm_remove_tmp_files() ...@@ -750,6 +756,19 @@ __epm_remove_tmp_files()
} }
remove_on_exit()
{
trap "__epm_remove_tmp_files" EXIT
while [ -n "$1" ] ; do
if [ -d "$1" ] ; then
to_clean_tmp_dirs="$to_clean_tmp_dirs $1"
elif [ -f "$1" ] ; then
to_clean_tmp_files="$to_clean_tmp_files $1"
fi
shift
done
}
has_space() has_space()
{ {
estrlist -- has_space "$@" estrlist -- has_space "$@"
......
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