Commit b1e02a44 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.29.1

parent 3bd7fb91
...@@ -150,6 +150,15 @@ showcmd() ...@@ -150,6 +150,15 @@ showcmd()
fi >&2 fi >&2
} }
echocmd()
{
set_boldcolor $GREEN
local PROMTSIG="\$"
is_root && PROMTSIG="#"
echo -n "$PROMTSIG $*"
restore_color
}
docmd() docmd()
{ {
showcmd "$*$EXTRA_SHOWDOCMD" showcmd "$*$EXTRA_SHOWDOCMD"
...@@ -287,8 +296,7 @@ clean_store_output() ...@@ -287,8 +296,7 @@ clean_store_output()
epm() epm()
{ {
if [ -n "$PROGNAME" ] ; then if [ -n "$PROGNAME" ] ; then
#|| fatal "Can't use epm call from the piped script" /bin/sh $PROGDIR/$PROGNAME --inscript "$@"
$PROGDIR/$PROGNAME --inscript "$@"
else else
epm_main --inscript "$@" epm_main --inscript "$@"
fi fi
...@@ -296,14 +304,14 @@ epm() ...@@ -296,14 +304,14 @@ epm()
sudoepm() sudoepm()
{ {
[ -n "$PROGNAME" ] || fatal "Can't use epm call from the piped script" [ -n "$PROGNAME" ] || fatal "Can't use sudo epm call from the piped script"
sudorun $PROGDIR/$PROGNAME --inscript "$@" sudorun /bin/sh $PROGDIR/$PROGNAME --inscript "$@"
} }
fatal() fatal()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
echo "Error: $*" >&2 echo "Error: $* (you can discuss the problem in Telegram: https://t.me/useepm)" >&2
fi fi
exit 1 exit 1
} }
...@@ -510,7 +518,9 @@ estrlist() ...@@ -510,7 +518,9 @@ estrlist()
eget() eget()
{ {
assure_exists wget # check for both
which curl 2>/dev/null >/dev/null || assure_exists wget
which wget 2>/dev/null >/dev/null || assure_exists curl
internal_tools_eget "$@" internal_tools_eget "$@"
} }
...@@ -2594,11 +2604,20 @@ __epm_korinf_list() { ...@@ -2594,11 +2604,20 @@ __epm_korinf_list() {
__epm_korinf_install() { __epm_korinf_install() {
local PACKAGE="$1"
# skip interactive for install eepm from stdin
if inputisatty && [ -n "$PROGDIR" ] && [ "$1" != "eepm" ] ; then
[ -n "$non_interactive" ] || interactive="--interactive"
fi
local pkg
local pkg_urls=''
for pkg in $* ; do
pkg_urls="$pkg_urls $(__epm_korinf_site_mask "$pkg")"
done
# due Error: Can't use epm call from the piped script # due Error: Can't use epm call from the piped script
#epm install $(__epm_korinf_site_mask "$PACKAGE") #epm install $(__epm_korinf_site_mask "$PACKAGE")
[ -n "$non_interactive" ] || interactive="--interactive" pkg_names='' pkg_files='' epm_install
pkg_names='' pkg_files='' pkg_urls="$(__epm_korinf_site_mask "$PACKAGE")" epm_install
} }
epm_epm_install() { epm_epm_install() {
...@@ -2618,9 +2637,7 @@ epm_epm_install() { ...@@ -2618,9 +2637,7 @@ epm_epm_install() {
;; ;;
esac esac
for i in $pkglist ; do __epm_korinf_install $pkglist
__epm_korinf_install $i
done
} }
# File bin/epm-filelist: # File bin/epm-filelist:
...@@ -11828,9 +11845,9 @@ Examples: ...@@ -11828,9 +11845,9 @@ Examples:
print_version() print_version()
{ {
echo "EPM package manager version 3.29.0 https://wiki.etersoft.ru/Epm" echo "EPM package manager version 3.29.1 Telegram: https://t.me/useepm https://wiki.etersoft.ru/Epm"
echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)" echo "Running on $($DISTRVENDOR -e) ('$PMTYPE' package manager uses '$PKGFORMAT' package format)"
echo "Copyright (c) Etersoft 2012-2022" echo "Copyright (c) Etersoft 2012-2023"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
} }
...@@ -11838,7 +11855,7 @@ print_version() ...@@ -11838,7 +11855,7 @@ print_version()
Usage="Usage: epm [options] <command> [package name(s), package files]..." Usage="Usage: epm [options] <command> [package name(s), package files]..."
Descr="epm - EPM package manager" Descr="epm - EPM package manager"
EPMVERSION=3.29.0 EPMVERSION=3.29.1
verbose=$EPM_VERBOSE verbose=$EPM_VERBOSE
quiet= quiet=
nodeps= nodeps=
...@@ -12307,12 +12324,12 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names") ...@@ -12307,12 +12324,12 @@ pkg_filenames=$(strip_spaces "$pkg_files $pkg_names")
# Just printout help if run without args # Just printout help if run without args
if [ -z "$epm_cmd" ] ; then if [ -z "$epm_cmd" ] ; then
print_version print_version >&2
echo echo >&2
fatstr="Unknown command in $* arg(s)" fatstr="Unrecognized command in '$*' arg(s)"
[ -n "$*" ] || fatstr="That program needs be running with some command" [ -n "$*" ] || fatstr="That program needs be running with some command"
echo "Run $ $PROGNAME --help to get help." >&2 echo "Run $(echocmd "$PROGNAME --help") to get help." >&2
echo "Run $ epm print info to get some system and distro info." >&2 echo "Run $(echocmd "epm print info") to get some system and distro info." >&2
fatal "$fatstr." fatal "$fatstr."
fi fi
......
...@@ -140,6 +140,15 @@ showcmd() ...@@ -140,6 +140,15 @@ showcmd()
fi >&2 fi >&2
} }
echocmd()
{
set_boldcolor $GREEN
local PROMTSIG="\$"
is_root && PROMTSIG="#"
echo -n "$PROMTSIG $*"
restore_color
}
docmd() docmd()
{ {
showcmd "$*$EXTRA_SHOWDOCMD" showcmd "$*$EXTRA_SHOWDOCMD"
...@@ -277,8 +286,7 @@ clean_store_output() ...@@ -277,8 +286,7 @@ clean_store_output()
epm() epm()
{ {
if [ -n "$PROGNAME" ] ; then if [ -n "$PROGNAME" ] ; then
#|| fatal "Can't use epm call from the piped script" /bin/sh $PROGDIR/$PROGNAME --inscript "$@"
$PROGDIR/$PROGNAME --inscript "$@"
else else
epm_main --inscript "$@" epm_main --inscript "$@"
fi fi
...@@ -286,14 +294,14 @@ epm() ...@@ -286,14 +294,14 @@ epm()
sudoepm() sudoepm()
{ {
[ -n "$PROGNAME" ] || fatal "Can't use epm call from the piped script" [ -n "$PROGNAME" ] || fatal "Can't use sudo epm call from the piped script"
sudorun $PROGDIR/$PROGNAME --inscript "$@" sudorun /bin/sh $PROGDIR/$PROGNAME --inscript "$@"
} }
fatal() fatal()
{ {
if [ -z "$TEXTDOMAIN" ] ; then if [ -z "$TEXTDOMAIN" ] ; then
echo "Error: $*" >&2 echo "Error: $* (you can discuss the problem in Telegram: https://t.me/useepm)" >&2
fi fi
exit 1 exit 1
} }
...@@ -500,7 +508,9 @@ estrlist() ...@@ -500,7 +508,9 @@ estrlist()
eget() eget()
{ {
assure_exists wget # check for both
which curl 2>/dev/null >/dev/null || assure_exists wget
which wget 2>/dev/null >/dev/null || assure_exists curl
internal_tools_eget "$@" internal_tools_eget "$@"
} }
...@@ -2361,7 +2371,7 @@ print_version() ...@@ -2361,7 +2371,7 @@ print_version()
local on_text="(host system)" local on_text="(host system)"
local virt="$($DISTRVENDOR -i)" local virt="$($DISTRVENDOR -i)"
[ "$virt" = "(unknown)" ] || [ "$virt" = "(host system)" ] || on_text="(under $virt)" [ "$virt" = "(unknown)" ] || [ "$virt" = "(host system)" ] || on_text="(under $virt)"
echo "Service manager version 3.29.0 https://wiki.etersoft.ru/Epm" echo "Service manager version 3.29.1 https://wiki.etersoft.ru/Epm"
echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE" echo "Running on $($DISTRVENDOR -e) $on_text with $SERVICETYPE"
echo "Copyright (c) Etersoft 2012-2021" echo "Copyright (c) Etersoft 2012-2021"
echo "This program may be freely redistributed under the terms of the GNU AGPLv3." echo "This program may be freely redistributed under the terms of the GNU AGPLv3."
......
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