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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user