Merge from odoo task

This commit is contained in:
dig 2018-05-21 20:21:09 +02:00
parent 729e07358a
commit e879c16a5d
1 changed files with 7 additions and 7 deletions

View File

@ -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
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 ... )
if [ -r "\$(dirname \$0)/.\$(basename \$0)/\$1" ]
then
verbose "Command file exists call it: \$(dirname \$0)/.\$(basename \$0)/\$1 \${*:2}"
\$(dirname \$0)/.\$(basename \$0)/\$1 \${*:2}
if [ -r "$__dirtask/$1" ]
verbose "Command file exists call it: \$__dirtask/\$1 \${*:2}"
\$__dirtask/\$1 \${*:2}
else
if [ -n "$(type -t $1)" ] && [ "$(type -t $1)" = function ];
then
verbose "\$(dirname \$0)/.\$(basename \$0)/\$1 not exists try func: \$1 \${*:2}"
verbose "\$__dirtask/\$1 not exists try func: \$1 \${*:2}"
\$1 "\${*:2}"
fi
fi