Project

General

Profile

« Previous | Next » 

Revision 1953

Scripts that are meant to be run in the calling shell: Fixed bug where running the script inside another script would make the script think it was being run as a program, and abort with a usage error

View differences:

env_password
11 11
    test "$1" = - && { store=1; shift;}
12 12
    
13 13
    # Was run without initial ".", or with insufficient parameters
14
    if test "${BASH_LINENO[@]: -1}" = 0 -o "$#" -lt 1; then
14
    if test "${BASH_LINENO[1]}" = 0 -o "$#" -lt 1; then
15 15
        echo "Usage: . $self env_var [desc] (note initial \".\")"|fold -s >&2
16 16
        return 2
17 17
    fi

Also available in: Unified diff