Refactor piscal_launcher.sh and piscal_manager.sh for improved quoting and error handling. Ensure proper handling of variables and directory paths to enhance script robustness.

This commit is contained in:
2026-03-18 22:13:50 -04:00
parent 44fd41f0e3
commit 9be068962c
2 changed files with 23 additions and 15 deletions
+5 -4
View File
@@ -92,10 +92,11 @@ if [ ! -d "$run_directory" ]; then
fi
# run piscal
pushd $run_directory >> /dev/null
pushd "$run_directory" >> /dev/null
if [ -z "$test_output_directory" ]; then
eval $piscal_executable
# `piscal_executable` comes from a cfg file and may include args.
eval "$piscal_executable"
else
cp -r "$test_output_directory"/* "$output_directory_base"/
fi
@@ -112,10 +113,10 @@ if [ -z "$suppress_storage_copy" ]; then
if [ ! -f "$mv_script" ]; then
mv_script="/srv/subdir_year.sh"
fi
pushd "$storage_directory"/output >> /dev/null
pushd "$storage_directory/output" >> /dev/null
"$mv_script"
popd >> /dev/null
pushd "$storage_directory"/input >> /dev/null
pushd "$storage_directory/input" >> /dev/null
"$mv_script"
popd >> /dev/null
fi