Commit a8fd5118 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm: add some quotes

parent cf906a45
......@@ -17,8 +17,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
PROGDIR=$(dirname "$0")
PROGNAME=$(basename "$0")
PROGDIR="$(dirname "$0")"
PROGNAME="$(basename "$0")"
[ -n "$EPMCURDIR" ] || export EPMCURDIR="$(pwd)"
CMDENV="/usr/bin/env"
[ -x "$CMDENV" ] && CMDSHELL="/usr/bin/env bash" || CMDSHELL="$SHELL"
......@@ -30,9 +30,9 @@ if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
fi
# will replaced with /usr/share/eepm during install
SHAREDIR=$PROGDIR
SHAREDIR="$PROGDIR"
# will replaced with /etc/eepm during install
CONFIGDIR=$PROGDIR/../etc
CONFIGDIR="$PROGDIR/../etc"
export EPMVERSION="@VERSION@"
......@@ -43,7 +43,7 @@ EPMMODE="package"
[ "$PROGNAME" = "" ] && EPMMODE="pipe"
if [ "$EPMMODE" = "git" ] ; then
EPMVERSION=$(head $PROGDIR/../eepm.spec | grep "^Version: " | sed -e 's|Version: ||' )
EPMVERSION="$(head "$PROGDIR/../eepm.spec" | grep "^Version: " | sed -e 's|Version: ||' )"
fi
load_helper()
......@@ -67,7 +67,7 @@ load_helper()
load_helper epm-sh-functions
eget_backend=$EGET_BACKEND
eget_backend="$EGET_BACKEND"
# fast call for tool
if [ "$1" = "tool" ] ; then
......
......@@ -742,7 +742,7 @@ eget()
{
# use internal eget only if exists
if [ -s $SHAREDIR/tools_eget ] ; then
( EGET_BACKEND=$eget_backend $CMDSHELL $SHAREDIR/tools_eget "$@" )
( EGET_BACKEND="$eget_backend" $CMDSHELL "$SHAREDIR"/tools_eget "$@" )
return
fi
fatal "Internal error: missed tools_eget"
......@@ -773,8 +773,8 @@ erc()
__epm_assure_7zip
# use internal eget only if exists
if [ -s $SHAREDIR/tools_erc ] ; then
$CMDSHELL $SHAREDIR/tools_erc "$@"
if [ -s "$SHAREDIR"/tools_erc ] ; then
$CMDSHELL "$SHAREDIR"/tools_erc "$@"
return
fi
fatal "Internal error: missed tools_erc"
......@@ -792,8 +792,8 @@ ercat()
{
local ERCAT
# use internal eget only if exists
if [ -s $SHAREDIR/tools_ercat ] ; then
$CMDSHELL $SHAREDIR/tools_ercat "$@"
if [ -s "$SHAREDIR"/tools_ercat ] ; then
$CMDSHELL "$SHAREDIR"/tools_ercat "$@"
return
fi
fatal "Internal error: missed tools_ercat"
......@@ -807,8 +807,8 @@ ercat()
estrlist()
{
if [ -s $SHAREDIR/tools_estrlist ] ; then
$CMDSHELL $SHAREDIR/tools_estrlist "$@"
if [ -s "$SHAREDIR"/tools_estrlist ] ; then
$CMDSHELL "$SHAREDIR"/tools_estrlist "$@"
return
fi
fatal "missed tools_estrlist"
......@@ -952,7 +952,7 @@ set_distro_info()
# don't run again in subprocesses
[ -n "$DISTRVENDOR" ] && return 0
DISTRVENDOR=$PROGDIR/distr_info
DISTRVENDOR="$PROGDIR"/distr_info
# export pack of variables, see epm print info --print-eepm-env
[ -n "$verbose" ] && $DISTRVENDOR --print-eepm-env
......@@ -967,12 +967,12 @@ set_pm_type()
# override package manager detection result
if [ -n "$EPM_BACKEND" ] ; then
PMTYPE=$EPM_BACKEND
PMTYPE="$EPM_BACKEND"
return
fi
# obsoleted
if [ -n "$FORCEPM" ] ; then
PMTYPE=$FORCEPM
PMTYPE="$FORCEPM"
return
fi
......
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