X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=blobdiff_plain;f=subcommand;fp=subcommand;h=95e0ba9ebbc48aa5f8753d2e8fc42d8e594a26b7;hp=05860f68395f67ffd3e9a51a60e48eb857a9cca8;hb=545f2b7b22c800fd4645e5784cd35a318d2e60d6;hpb=ed4541e12d830109204e66ac8c76750d3693eeff diff --git a/subcommand b/subcommand index 05860f6..95e0ba9 100644 --- a/subcommand +++ b/subcommand @@ -1,9 +1,10 @@ #!/bin/bash # (C) 2006-2011 Andre Noll -if [[ $(type -t gsu_is_a_number) != "function" ]]; then - GSU_DIR=${GSU_DIR:=${HOME-}/.gsu} - . $GSU_DIR/common || exit 1 +if [[ "$(type -t _gsu_setup)" != "function" ]]; then + gsu_dir=${gsu_dir:-${BASH_SOURCE[0]%/*}} + . $gsu_dir/common || exit 1 + _gsu_setup fi _gsu_usage() @@ -524,7 +525,6 @@ gsu_get_unnamed_arg_num() gsu() { local i - _gsu_setup _gsu_available_commands gsu_cmds="$result" if (($# == 0)); then