Commit b4ceac0c authored by Vitaly Lipatov's avatar Vitaly Lipatov

remove quotes from commands

parent 4cdf5994
......@@ -124,18 +124,19 @@ showcmd()
docmd()
{
showcmd "$@$EXTRA_SHOWDOCMD"
"$@"
#FIXME
$@
}
# Run every arg with docmd
docmd_foreach()
{
local cmd
local cmd pkg
cmd="$1"
#showcmd "$@"
shift
for pkg in "$@" ; do
docmd $cmd $pkg
docmd "$cmd" $pkg
done
}
......@@ -143,18 +144,18 @@ docmd_foreach()
sudocmd()
{
showcmd "$SUDO $@"
$SUDO "$@"
$SUDO $@
}
# Run every arg with sudocmd
sudocmd_foreach()
{
local cmd
local cmd pkg
cmd="$1"
#showcmd "$@"
shift
for pkg in "$@" ; do
sudocmd $cmd $pkg
sudocmd "$cmd" $pkg
done
}
......@@ -197,7 +198,7 @@ store_output()
local CMDSTATUS=$RC_STDOUT.pipestatus
echo 1 >$CMDSTATUS
#RC_STDERR=$(mktemp)
( "$@" 2>&1 ; echo $? >$CMDSTATUS ) | tee $RC_STDOUT
( $@ 2>&1 ; echo $? >$CMDSTATUS ) | tee $RC_STDOUT
return $(cat $CMDSTATUS)
# bashism
# http://tldp.org/LDP/abs/html/bashver3.html#PIPEFAILREF
......@@ -209,7 +210,7 @@ clean_store_output()
rm -f $RC_STDOUT $RC_STDOUT.pipestatus
}
# run epm, possible from side repo
epm()
{
$PROGDIR/epm $@
......
#!/bin/sh
SUDO=
#sudofunc
sudofunc()
{
echo "arg1: $1"
echo "arg2: $2"
echo "arg3: $3"
echo "arg4: $4"
}
# fake
showcmd()
{
echo "$@"
}
# Print command line and run command line with SUDO
sudocmd()
{
showcmd "$SUDO $@"
#FIXME
$SUDO $@
}
sudocmd "ls -l" "-a -a"
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