+#hmmm: eventual approach-- if variable exists already, save old value for restore,
+# otherwise save null value for restore,
+# have to handle unsetting if there was no prior value of one
+# we newly defined.
+# add variable name to a list of feisty defined variables.
+
+return 0
+ }
+
+ # switches from an X:/ form to a /cygdrive/X/path form. this is only useful
+ # for the cygwin environment currently.
+ # defined here rather than in functions.sh since we need it when setting variables
+ # and cannot count on load order during a fresh startup in some circumstances.
+ function dos_to_unix_path() {
+ # we always remove dos slashes in favor of forward slashes.
+#old: echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/\1\/\2/'
+ echo "$1" | sed -e 's/\\/\//g' | sed -e 's/\([a-zA-Z]\):\/\(.*\)/\/cygdrive\/\1\/\2/'
+ }
+
+
+
+##############
+
+# this section should always run or bash will reset them on us.
+# these need to be as minimal as possible.
+
+# sets the main prompt to a simple default, with user@host.
+define_yeti_variable PS1='\u@\h $ ';
+# sets the history length and max file size so we can get some long history around here.
+define_yeti_variable HISTSIZE=1000000
+define_yeti_variable HISTFILESIZE=8000000
+
+# make the TERM available to all sub-shells.
+define_yeti_variable TERM
+
+##############
+
+# we'll run this again only if we think it's needed.
+if [ -z "$CORE_VARIABLES_LOADED" ]; then
+
+ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then echo variables initialization begins...; fi
+
+ ##############
+
+ # start with some simpler things.
+
+#hmmm: this needs to come from some configuration item. especially for installs.
+define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org
+
+ define_yeti_variable SCRIPT_SYSTEM=feisty_meow
+
+ # OS variable records the operating system we think we found.
+ if [ -z "$OS" ]; then
+ define_yeti_variable OS=UNIX
+ fi
+ define_yeti_variable IS_DARWIN=$(echo $OSTYPE | grep -i darwin)
+
+ ##############
+
+ # guess the current platform.
+ IS_UNIX=$(uname | grep -i linux)
+ if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i unix); fi
+ if [ -z "$IS_UNIX" ]; then IS_UNIX=$(uname | grep -i darwin); fi
+ IS_DOS=$(uname | grep -i ming)
+ if [ -z "$IS_DOS" ]; then IS_DOS=$(uname | grep -i cygwin); fi
+
+ # now if we're stuck in DOS, try to determine the type of system.
+ if [ ! -z "$IS_DOS" ]; then
+ # IS_MSYS will be non-empty if this is the msys toolset. otherwise
+ # we assume that it's cygwin.
+ IS_MSYS=$(uname | grep -i ming)
+
+ # if not MSYS, then we'll assume cygwin and set the cygwin root var.
+ if [ -z "$IS_MSYS" ]; then
+ define_yeti_variable CYGROOT=$(cygpath -w -m /)