From 974cb458e356b918d426db0f9f0a2dcbebcd7034 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Sat, 11 Nov 2017 07:53:41 -0500 Subject: [PATCH] argh, this has to start working soon --- scripts/core/launch_feisty_meow.sh | 41 ++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/scripts/core/launch_feisty_meow.sh b/scripts/core/launch_feisty_meow.sh index 631d78e9..65a579a5 100644 --- a/scripts/core/launch_feisty_meow.sh +++ b/scripts/core/launch_feisty_meow.sh @@ -18,6 +18,8 @@ ############## +echo "yodel; feisty apex=$FEISTY_MEOW_APEX; feisty scripts=$FEISTY_MEOW_SCRIPTS" + # this script cannot handle figuring out where it lives, so approaches that # get the WORKDIR will fail. this is a consequence of this always being used # in bash's 'source' directive, which does not pass the script name as @@ -44,23 +46,48 @@ if [ ! -d "$FEISTY_MEOW_APEX" ]; then The feisty meow configuration is damaged somehow. Please change to the directory where it is stored, e.g.: - cd /opt/feistymeow.org/feisty_meow + cd /opt/feistymeow.org/feisty_meow -and execute this command: +and run this command (the whole unwieldy thing on multiple lines): - export FEISTY_MEOW_APEX=\$(pwd); echo \"export FEISTY_MEOW_APEX=\$FEISTY_MEOW_APEX\" \> \$HOME/\$USER.fm-fix ; exec /bin/bash -c 'source \$HOME/\$USER.fm-fix; /bin/bash \$FEISTY_MEOW_APEX/scripts/core/reconfigure_feisty_meow.sh ; source \$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh ; /bin/bash -i --norc --noprofile ' +echo pwd outside \$(pwd\) ; + exec bash -i 3<&- <&4 +EOF Note that this assumes that the .bashrc file could still need editing to fix -an erroneous FEISTY_MEOW_APEX variable, so we skip it when bash runs. Check -\$HOME/.bashrc to see if a change there will fix the above error. +an erroneous FEISTY_MEOW_APEX variable, so we skip it above when bash runs. +Check \$HOME/.bashrc to see if a change there will fix the problem. " +else + # apex is good, so let's make the scripts good too. + if [ ! -d "$FEISTY_MEOW_SCRIPTS" ]; then + export FEISTY_MEOW_SCRIPTS="$FEISTY_MEOW_APEX/scripts" + fi + # check again to test our belief system... + if [ ! -d "$FEISTY_MEOW_SCRIPTS" ]; then + unset NO_REPAIRS_NEEDED + echo -e "The feisty meow scripts cannot be found under the current top:\n FEISTY_MEOW_APEX=$FEISTY_MEOW_APEX" + fi fi +#; /bin/bash -i --norc --noprofile\" > \$HOME/fm-fix +#; exec /bin/bash -i --norc --noprofile -c 'bash \$HOME/fm-fix ; echo hello ; read line; read line ;read line' +#--norc --noprofile #; source \$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh if [ "$NO_REPAIRS_NEEDED" == "true" ]; then +echo GOT TO NO REPAIRS PLACE +read line + # we believe it's safe to run through the rest of this script. ############## @@ -188,5 +215,9 @@ if [ "$NO_REPAIRS_NEEDED" == "true" ]; then fi # no error occurred. +else +echo SOME REPAIRS WERE NEEED +read line + fi # "$NO_REPAIRS_NEEDED" was == "true" -- 2.34.1