X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fgenerator%2Fproduce_feisty_meow.sh;h=007bee3f0075b8996c37b9b20a7a0f3f85733c6e;hb=39dbe2cabfc181def8903f6009ed967ad2dc1d9b;hp=41e3bd544f156c9f5588cc0c669ab39b4462b37c;hpb=e16e899f1a75d8c4df9d36ffac2d8d2d401c4114;p=feisty_meow.git diff --git a/scripts/generator/produce_feisty_meow.sh b/scripts/generator/produce_feisty_meow.sh index 41e3bd54..007bee3f 100644 --- a/scripts/generator/produce_feisty_meow.sh +++ b/scripts/generator/produce_feisty_meow.sh @@ -98,7 +98,7 @@ function update_system_helper_header() fi echo "found root as '$found_root'" # translate any backslashes to forward thinking slashes. - found_root=$(echo $found_root | tr '\\' '/') + found_root="$(echo $found_root | tr '\\' '/')" echo "processed root is now: '$found_root'" # edit the entry in place to correct the default path. sed -i \ @@ -110,6 +110,30 @@ cat "$FEISTY_MEOW_BINARIES/system_helper.h" fi } +function make_code { + make $* $BE_NOISY ${BUILD_DEFAULTS[@]} + if [ $? != 0 ]; then + echo "Failed to make on: $*" + exit 2323 + fi +} + +# removes pcdos eol from any scripts. that assumes that the bootstrap script +# itself isn't polluted with them. +function strip_cr { + ctrl_m=$'\015' + for i in $*; do + tempgrep="$(mktemp "$TEMPORARIES_PILE/tempgrep.XXXXXX")" + grep -l "$ctrl_m" "$i" >$tempgrep + if [ ! -z "$(cat $tempgrep)" ]; then + temp="$(mktemp "$TEMPORARIES_PILE/tempsed.XXXXXX")" + sed -e "s/$ctrl_m$//" <$i >$temp + mv -f $temp $i + fi + rm "$tempgrep" + done +} + ############## # turn off sounds to avoid running the sound player that's not been built yet. @@ -122,9 +146,6 @@ echo "Build bootstrap process has started." # preconditions for the build process... -# set up our output directories etc. -prepare_clam_binaries_dir - # set a flag for this process so we can omit certain compilations as necessary. export BOOT_STRAPPING=true @@ -143,30 +164,6 @@ declare -a BUILD_DEFAULTS=( "BOOT_STRAPPING=t" "OPTIMIZE=t" "REBUILD=t" "DEBUG=" # noisy can be added to spew lots of text: "NOISY=t" # this can help with compilation issues by showing all the flags. -function make_code { - make $* $BE_NOISY ${BUILD_DEFAULTS[@]} - if [ $? != 0 ]; then - echo "Failed to make on: $*" - exit 2323 - fi -} - -# removes pcdos eol from any scripts. that assumes that the bootstrap script -# itself isn't polluted with them. -function strip_cr { - ctrl_m=$'\015' - for i in $*; do - tempgrep="$(mktemp "$TEMPORARIES_PILE/tempgrep.XXXXXX")" - grep -l "$ctrl_m" "$i" >$tempgrep - if [ ! -z "$(cat $tempgrep)" ]; then - temp="$(mktemp "$TEMPORARIES_PILE/tempsed.XXXXXX")" - sed -e "s/$ctrl_m$//" <$i >$temp - mv -f $temp $i - fi - rm "$tempgrep" - done -} - # the promote function moves a file from the exe directory into the build's # bin directory. it performs the copy step and makes the file executable. # the original name should just be the root of the filename without any @@ -210,6 +207,9 @@ source "$BUILD_SCRIPTS_PATH/build_variables.sh" "$BUILD_SCRIPTS_PATH/build_varia # clean out any current contents. bash "$BUILD_SCRIPTS_PATH/whack_build.sh" clean +# set up our output directories etc. +prepare_clam_binaries_dir + # make this again so no one gets cranky. mkdir -p "$FEISTY_MEOW_LOGS"