turned off debugging noise
[feisty_meow.git] / scripts / core / loadfm.sh
1 #!/usr/bin/env bash
2
3 # this is a simplified feisty meow environment loader that starts
4 # a subshell within which the environment is available.  exiting
5 # one time gets back to the shell that ran this script.  (this script
6 # is designed to be executed, not sourced.)
7
8 # Author: Chris Koeritz
9
10 ORIGINATING_FOLDER="$( \cd "$(\dirname "$0")" && /bin/pwd )"
11 export CORE_SCRIPTS_DIR="$(echo "$ORIGINATING_FOLDER" | tr '\\\\' '/' )"
12 #echo core scripts dir is $CORE_SCRIPTS_DIR
13
14 THIS_TOOL_NAME="$(basename "$0")"
15
16 pushd "$CORE_SCRIPTS_DIR/../.." &>/dev/null
17 export FEISTY_MEOW_APEX="$(/bin/pwd)"
18 popd &> /dev/null
19 echo "feisty meow apex is '$FEISTY_MEOW_APEX'"
20
21 #hmmm: actually this should run the reconfigure script first!
22 #      then we would be semi-bulletproof and wouldn't actually have
23 #      to make users run that as first step?
24
25 bash --init-file <(echo "\
26 bash "$CORE_SCRIPTS_DIR/reconfigure_feisty_meow.sh"; \
27 if [ $? -ne 0 ]; then echo "error--reconfiguring feisty meow environment failed."; fi; \
28 source "$CORE_SCRIPTS_DIR/launch_feisty_meow.sh"; \
29 if [ $? -ne 0 ]; then echo "error--launching feisty meow environment failed."; fi; \
30 ")
31
32 ####
33