Skip to content

Commit

Permalink
Code & Features Update
Browse files Browse the repository at this point in the history
  • Loading branch information
nathaneltitane committed Sep 17, 2023
1 parent fc1d5b6 commit ef78343
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions l2cu
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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

Expand All @@ -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"
Expand Down

0 comments on commit ef78343

Please sign in to comment.