Commit 5ffb29a4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

commit packed 3.62.2

parent e8662361
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
PROGDIR=$(dirname "$0") PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0") PROGNAME=$(basename "$0")
[ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)" [ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)"
CMDSHELL="/bin/bash" CMDENV="/usr/bin/env"
[ -x "$CMDENV" ] && CMDSHELL="/usr/bin/env bash" || CMDSHELL="$SHELL"
# TODO: pwd for ./epm and which for epm # TODO: pwd for ./epm and which for epm
[ "$PROGDIR" = "." ] && PROGDIR="$EPMCURDIR" [ "$PROGDIR" = "." ] && PROGDIR="$EPMCURDIR"
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
...@@ -33,7 +34,7 @@ SHAREDIR=$PROGDIR ...@@ -33,7 +34,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.62.1" EPMVERSION="3.62.2"
# package, single (file), pipe, git # package, single (file), pipe, git
EPMMODE="package" EPMMODE="package"
...@@ -404,7 +405,7 @@ info() ...@@ -404,7 +405,7 @@ info()
check_su_root() check_su_root()
{ {
[ "$BASEDISTRNAME" = "alt" ] || return 0 #[ "$BASEDISTRNAME" = "alt" ] || return 0
is_root || return 0 is_root || return 0
...@@ -457,6 +458,7 @@ set_sudo() ...@@ -457,6 +458,7 @@ set_sudo()
fi fi
fi fi
else else
# TODO: check user_can_sudo in https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh
# use sudo if one is tuned and tuned without password # use sudo if one is tuned and tuned without password
# hack: check twice # hack: check twice
$SUDO_CMD -l -n >/dev/null 2>/dev/null $SUDO_CMD -l -n >/dev/null 2>/dev/null
...@@ -661,7 +663,7 @@ regexp_subst() ...@@ -661,7 +663,7 @@ regexp_subst()
sed -i -r -e "$expression" "$@" sed -i -r -e "$expression" "$@"
} }
assure_exists() try_assure_exists()
{ {
local package="$2" local package="$2"
[ -n "$package" ] || package="$(__get_package_for_command "$1")" [ -n "$package" ] || package="$(__get_package_for_command "$1")"
...@@ -670,9 +672,15 @@ assure_exists() ...@@ -670,9 +672,15 @@ assure_exists()
local ask='' local ask=''
[ -n "$non_interactive" ] || ask=1 [ -n "$non_interactive" ] || ask=1
( verbose='' direct='' interactive=$ask epm_assure "$1" $package $3 ) || fatal ( verbose='' direct='' interactive=$ask epm_assure "$1" $package $3 )
} }
assure_exists()
{
try_assure_exists "$@" || fatal
}
assure_exists_erc() assure_exists_erc()
{ {
local package="erc" local package="erc"
...@@ -762,8 +770,8 @@ eget() ...@@ -762,8 +770,8 @@ eget()
{ {
# check for both # check for both
# we really need that cross here, # we really need that cross here,
is_command curl || assure_exists wget is_command curl || try_assure_exists wget
is_command wget || assure_exists curl is_command wget || try_assure_exists curl
internal_tools_eget "$@" internal_tools_eget "$@"
} }
...@@ -877,6 +885,8 @@ set_distro_info() ...@@ -877,6 +885,8 @@ set_distro_info()
test_shell test_shell
[ -n "$SUDO_USER" ] && warning "It is not necessary to run epm using sudo."
assure_tmpdir assure_tmpdir
set_bigtmpdir set_bigtmpdir
......
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