Skip to content
This repository was archived by the owner on Sep 8, 2025. It is now read-only.

Commit 87cfcdf

Browse files
committed
parse config options with raw jq output
closes #2
1 parent e36ca73 commit 87cfcdf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

run

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ LOG_FILE=/flywheel/v0/output/mri-deface.log
4646
if [[ -e $CONFIG_FILE ]]
4747
then
4848
echo "Config file is present"
49-
outextension=`cat $CONFIG_FILE | jq '.config.output_extension'`
49+
outextension=`cat $CONFIG_FILE | jq -r '.config.output_extension'`
5050
echo "The extension read from the config file: $outextension"
5151
# Otherwise, define output file extension as nifti (.nii.gz)
5252
else
53-
outextension="nii.gz"
53+
outextension=".nii.gz"
5454
echo "No config file found, so default extension ($outextension) is being used for output"
5555
fi
5656
# Define output file to be passed to mri_deface
57-
output_file=$OUTPUT_DIR/$filename'_deface.'$outextension
57+
output_file=$OUTPUT_DIR/$filename'_deface'$outextension
5858
/flywheel/v0/mri_deface $input_file $brain_template $face_template $output_file
5959
else
6060
echo "No Nifti, DICOM or MGZ inputs were found within input directory $INPUT_DIR"

0 commit comments

Comments
 (0)