Cooking for almost a month.
* t/default_gsu_dir:
Unify gsu_dir handling.
}
if [[ "$(type -t _gsu_setup)" != "function" ]]; then
- gsu_dir=${gsu_dir:=${HOME:-}/.gsu}
+ gsu_dir=${gsu_dir:-${BASH_SOURCE[0]%/*}}
. $gsu_dir/common || exit 1
_gsu_setup
fi
#!/bin/bash
-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
export GSU_NODE_NAME_PATTERN='[a-zA-Z_]'
{
local tree="$1" subtree
- _gsu_setup
type -t dialog &> /dev/null
if (($? != 0)); then
gsu_msg "dialog executable not found"
#!/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()
gsu()
{
local i
- _gsu_setup
_gsu_available_commands
gsu_cmds="$result"
if (($# == 0)); then