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 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 "Feisty meow scripts need initialization 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.
71 # ignore duplicate lines and spaces for history.
72 HISTCONTROL=ignoredups:ignorespace
73 # append to the history file.
75 # automatically update window size if needed.
80 if [ -z "$LIGHTWEIGHT_INIT" ]; then
81 # perform the bulkier parts of the login and initialization.
83 if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login begins...; fi
85 # set up the aliases for the shell, but only if they are not already set.
86 alias regenerate &>/dev/null # see if a crucial alias exists.
88 if [ ! -z "$SHELL_DEBUG" ]; then
89 echo the aliases were missing, now they are added...
91 source "$FEISTY_MEOW_GENERATED/fmc_core_and_custom_aliases.sh"
94 # allow connections to our x server from the local host.
95 if [ ! -z "$DISPLAY" ]; then
96 if [ ! -z "$(echo "$OS_TYPE" | grep -i darwin)" ]; then
97 if [ ! -z "$SHELL_DEBUG" ]; then echo Enabling localhost X connections...; fi
98 xhost + localhost >/dev/null 2>&1
102 # a minor tickle of the title of the terminal, in case there is one.
103 bash $FEISTY_MEOW_SCRIPTS/tty/label_terminal_with_infos.sh
105 if [ ! -z "$SHELL_DEBUG" ]; then echo heavyweight login ends....; fi
108 if [ -z "$ERROR_OCCURRED" ]; then
109 # set a sentinel variable to say we loaded the feisty meow environment.
110 export FEISTY_MEOW_SCRIPTS_LOADED=true