X-Git-Url: http://git.tuebingen.mpg.de/?p=gsu.git;a=blobdiff_plain;f=subcommand;h=bab8ded4ea1d9f0b99562eca7dc8d257244062a0;hp=6b5df0a37c2a676c7c86d74c5a07371fddd2e1bf;hb=8d89aa241a5199b0a25edcf0e56da08c64aa4014;hpb=f31cc416b1acdbb8f5703b208d943ce500a5b840 diff --git a/subcommand b/subcommand index 6b5df0a..bab8ded 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() @@ -531,7 +532,6 @@ gsu_get_unnamed_arg_num() gsu() { local i - _gsu_setup _gsu_available_commands gsu_cmds="$result" if test $# -eq 0; then