Commit 4f6c7ac2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

fix sudocmd using (don't quote command with args)

parent 40494a90
......@@ -56,10 +56,10 @@ __separate_sudocmd()
shift 2
separate_installed $@
if [ -n "$pkg_noninstalled" ] ; then
sudocmd "$cmd_re" $pkg_noninstalled || return
sudocmd $cmd_re $pkg_noninstalled || return
fi
if [ -n "$pkg_installed" ] ; then
sudocmd "$cmd_in" $pkg_installed || return
sudocmd $cmd_in $pkg_installed || return
fi
return 0
}
......
......@@ -159,7 +159,8 @@ sudocmd_foreach()
#showcmd "$@"
shift
for pkg in "$@" ; do
sudocmd "$cmd" $pkg || return
# don't quote $cmd here: it can be a command with an args
sudocmd $cmd $pkg || return
done
}
......
#!/bin/sh
SUDO=
SUDO="sudo --"
#sudofunc
sudofunc()
......@@ -22,8 +22,10 @@ sudocmd()
{
showcmd "$SUDO $@"
#FIXME
$SUDO $@
$SUDO "$@"
}
sudocmd "ls -l" "-a -a"
sudocmd ls -l
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