From ef783433e3924f31de3e2ed259da3f9074d38224 Mon Sep 17 00:00:00 2001 From: nathaneltitane Date: Sun, 17 Sep 2023 15:59:06 -0400 Subject: [PATCH] Code & Features Update --- l2cu | 38 +++++++++++--------------------------- 1 file changed, 11 insertions(+), 27 deletions(-) diff --git a/l2cu b/l2cu index df75f2d..5976ca7 100755 --- a/l2cu +++ b/l2cu @@ -1024,41 +1024,21 @@ l2cu_write () { if [ "${overwrite_option}" = "overwrite" ] then - frobulator.wrn "Writing to model file" "[ overwrite ]" + frobulator.wrn "Overwriting model file" "[ overwrite ]" echo frobulator.inf "Writing" "[ ${model_file} ]" echo mv "${model_buffer}" "${model_buffer%.tmp}" - fi - - if [ -z "${overwrite_option}" ] - then - frobulator.ipt "Write to model file?" + else + frobulator.wrn "Writing to model file copy." echo - read reply - - if [[ "${reply}" = [yY] || "${reply}" = [yY][eE][sS] ]] - then - frobulator.inf "Writing to model file" "[ overwrite ]" - echo - - frobulator.inf "Writing" "[ ${model_file} ]" - echo - - mv "${model_buffer}" "${model_buffer%.tmp}" - - else - frobulator.inf "Writing to model file copy." - echo - - frobulator.fwd "Writing..." - echo + frobulator.fwd "Writing..." + echo - mv "${model_buffer}" "${model_buffer%.tmp}-modified-${stamp}.${extension}" - fi + mv "${model_buffer}" "${model_buffer%.tmp}-modified-${stamp}.${extension}" fi } @@ -1705,7 +1685,7 @@ then for extension in ${extensions_list[@]} do - echo $(find ${directory} -type f -iname "*.${extension}") | while read -r model_path + echo $(find ${directory} -type f -iname "*.${extension}" ! -iname "*instructions.${extension}") | while read -r model_path do # get model base directory from path @@ -1719,6 +1699,10 @@ then model_name="${model_file%.*}" + # use model directory as root + + model_directory="${model_path%/*}" + # set model buffer file model_buffer="${model_path}.tmp"