Browse Source

Merge from odoo task

master
dig 4 years ago
parent
commit
e879c16a5d
  1. 14
      tasks/.taskrc

14
tasks/.taskrc

@ -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

Loading…
Cancel
Save