Commit b4ceac0c authored by Vitaly Lipatov's avatar Vitaly Lipatov

remove quotes from commands

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