determine filenames after processing command line args, fixes bugs where EVERY file is noaa-15

master
Kenneth Barbour 2022-07-14 21:06:29 -04:00
parent 9c544f5ccb
commit 563a87c172
1 changed files with 5 additions and 4 deletions

View File

@ -144,18 +144,19 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
return
fi
# -- Do work below here --
process_args $@
# -- Default Values --
output_path=${output_path:=$(get_default_dir ${now})}
satellite=${satellite:='noaa-15'}
file_basename=${file_basename:=$(get_default_basename "${satellite}" "${now}")}
# -- Do work below here --
process_args $@
audio_file=${output_path}/${file_basename}.wav
mkdir -p ${output_path}
# Receive the pass (receive_pass.sh)
audio_file=${output_path}/${file_basename}.wav
printf "audio file: %s\n" "${audio_file}"
wxrx record $(receive_pass_flags "$duration" "${satellite}" "${audio_file}")
if [[ $? != 0 ]]; then
logerr "Errors occurred receiving signal"