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
19 if [ -z "$FEISTY_MEOW_GENERATED" ]; then
20 # FEISTY_MEOW_GENERATED is where the generated files yeti uses are located.
21 # this is our single entry point we can use without knowing any variables
22 # yet in the initialization process.
23 export FEISTY_MEOW_GENERATED="$HOME/.zz_auto_gen"
24 #hmmm: the above is kind of a constant. that's not so great.
26 # make sure our main variables are established.
27 GENERATED_FEISTY_MEOW_VARIABLES="$FEISTY_MEOW_GENERATED/fmc_variables.sh"
28 if [ ! -f "$GENERATED_FEISTY_MEOW_VARIABLES" ]; then
30 echo "The yeti scripts need to be initialized via the bootstrap process, e.g.:"
31 echo " bash $HOME/feisty_meow/scripts/core/bootstrap_shells.sh"
37 # pull in our generated variables that are the minimal set we need to find
38 # the rest of our resources.
39 source "$GENERATED_FEISTY_MEOW_VARIABLES"
41 # Set up the temporary directory.
42 source $FEISTY_MEOW_SCRIPTS/core/create_tempdir.sh
48 # load the larger body of standard feisty meow variables into the environment.
49 # we actually want this to always run also; it will decide what variables need
51 source $FEISTY_MEOW_SCRIPTS/core/variables.sh
55 # include helpful functions. we do this every time rather than making it part
56 # of variable initialization, because functions cannot be exported to
57 # sub-shells in bash (much like aliases cannot, to our infinite chagrin after
58 # having migrated from korn shell...).
59 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
63 # check hash table before searching path.
65 # don't check path for sourced files.
70 if [ -z "$LIGHTWEIGHT_INIT" ]; then
71 # perform the bulkier parts of the login and initialization.
73 if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login begins...; fi
75 # set up the aliases for the shell, but only if they are not already set.
76 alias regenerate &>/dev/null # see if a crucial alias exists.
78 if [ ! -z "$SHELL_DEBUG" ]; then
79 echo the aliases were missing, now they are added...
81 source "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh"
84 # allow connections to our x server from the local host.
85 if [ ! -z "$DISPLAY" ]; then
86 if [ ! -z "$(echo "$OS_TYPE" | grep -i darwin)" ]; then
87 if [ ! -z "$SHELL_DEBUG" ]; then echo Enabling localhost X connections...; fi
88 xhost + localhost >/dev/null 2>&1
92 # a minor tickle of the title of the terminal, in case there is one.
93 bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
95 if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login ends....; fi