5 # Fred Hamster's Feisty Meow Concerns Ltd. Startup Profile.
7 # This file is useful within .profile or other initialization scripts.
9 # Author: Chris Koeritz
13 #export SHELL_DEBUG=true
14 # this variable causes the scripts that listen to it to print more information
17 export ERROR_OCCURRED=
18 # no error to start with.
22 if [ -z "$FEISTY_MEOW_GENERATED" ]; then
23 # FEISTY_MEOW_GENERATED is where the generated files yeti uses are located.
24 # this is our single entry point we can use without knowing any variables
25 # yet in the initialization process.
26 export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen"
27 #hmmm: the above is kind of a constant. that's not so great.
29 # make sure our main variables are established.
30 GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/fmc_variables.sh"
31 if [ ! -f "$GENERATED_FEISTY_MEOW_VARIABLES" ]; then
33 echo "The yeti scripts need to be initialized via the bootstrap process, e.g.:"
34 echo " bash $HOME/feisty_meow/scripts/core/bootstrap_shells.sh"
41 # pull in our generated variables that are the minimal set we need to find
42 # the rest of our resources.
43 source "$GENERATED_FEISTY_MEOW_VARIABLES"
45 # Set up the temporary directory.
46 source $FEISTY_MEOW_SCRIPTS/core/create_tempdir.sh
52 # load the larger body of standard feisty meow variables into the environment.
53 # we actually want this to always run also; it will decide what variables need
55 source $FEISTY_MEOW_SCRIPTS/core/variables.sh
59 # include helpful functions. we do this every time rather than making it part
60 # of variable initialization, because functions cannot be exported to
61 # sub-shells in bash (much like aliases cannot, to our infinite chagrin after
62 # having migrated from korn shell...).
63 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
67 # check hash table before searching path.
69 # don't check path for sourced files.
74 if [ -z "$LIGHTWEIGHT_INIT" ]; then
75 # perform the bulkier parts of the login and initialization.
77 if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login begins...; fi
79 # set up the aliases for the shell, but only if they are not already set.
80 alias regenerate &>/dev/null # see if a crucial alias exists.
82 if [ ! -z "$SHELL_DEBUG" ]; then
83 echo the aliases were missing, now they are added...
85 source "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh"
88 # allow connections to our x server from the local host.
89 if [ ! -z "$DISPLAY" ]; then
90 if [ ! -z "$(echo "$OS_TYPE" | grep -i darwin)" ]; then
91 if [ ! -z "$SHELL_DEBUG" ]; then echo Enabling localhost X connections...; fi
92 xhost + localhost >/dev/null 2>&1
96 # a minor tickle of the title of the terminal, in case there is one.
97 bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
99 if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login ends....; fi
102 if [ -z "$ERROR_OCCURRED" ]; then
103 # set a sentinel variable to say we loaded the feisty meow environment.
104 export FEISTY_MEOW_SCRIPTS_LOADED=true