Project

General

Profile

« Previous | Next » 

Revision 11426

bugfix: lib/sh/util.sh: is_dot_script(): need to subtract 1 from ${#BASH_LINENO[@]}, because this is the array length rather than the index of the last element as in Perl

View differences:

lib/sh/util.sh
125 125

  
126 126
#### commands
127 127

  
128
is_dot_script() { echo_func; test "${BASH_LINENO[${#BASH_LINENO[@]}]}" != 0; }
128
is_dot_script() { echo_func; test "${BASH_LINENO[${#BASH_LINENO[@]}-1]}" != 0; }
129 129

  
130 130
sys_cmd_path() { echo_func; echo_builtin command -p which "$1"|echo_stdout; }
131 131

  

Also available in: Unified diff