Merge from odoo task
This commit is contained in:
parent
729e07358a
commit
e879c16a5d
|
@ -22,7 +22,7 @@ $(read -r -p Need\ some\ infos\ for\ task\ $TASK_NAME\ \(\ \hit\ enter\ \)\ v)
|
||||||
##
|
##
|
||||||
##
|
##
|
||||||
|
|
||||||
# wirte tour default options here
|
# write tour default options here
|
||||||
|
|
||||||
source easyoptions || exit
|
source easyoptions || exit
|
||||||
verbose() { [[ -n "$verbose" ]] && echo $1; }
|
verbose() { [[ -n "$verbose" ]] && echo $1; }
|
||||||
|
@ -64,17 +64,17 @@ verbose() { [[ -n "$verbose" ]] && echo $1; }
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
__dirname="$(dirname $0)"
|
||||||
|
__dirtask="$__dirname/.$(basename $0)"
|
||||||
|
|
||||||
# Calls command (1rt argument) as script or function \$1( \$2 \$3 ... )
|
# Calls command (1rt argument) as script or function \$1( \$2 \$3 ... )
|
||||||
if [ -r "\$(dirname \$0)/.\$(basename \$0)/\$1" ]
|
if [ -r "$__dirtask/$1" ]
|
||||||
then
|
verbose "Command file exists call it: \$__dirtask/\$1 \${*:2}"
|
||||||
verbose "Command file exists call it: \$(dirname \$0)/.\$(basename \$0)/\$1 \${*:2}"
|
\$__dirtask/\$1 \${*:2}
|
||||||
\$(dirname \$0)/.\$(basename \$0)/\$1 \${*:2}
|
|
||||||
else
|
else
|
||||||
if [ -n "$(type -t $1)" ] && [ "$(type -t $1)" = function ];
|
if [ -n "$(type -t $1)" ] && [ "$(type -t $1)" = function ];
|
||||||
then
|
then
|
||||||
verbose "\$(dirname \$0)/.\$(basename \$0)/\$1 not exists try func: \$1 \${*:2}"
|
verbose "\$__dirtask/\$1 not exists try func: \$1 \${*:2}"
|
||||||
\$1 "\${*:2}"
|
\$1 "\${*:2}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue