<repo_name>brainlife/app-checkOrientation<file_sep>/main
#!/bin/bash
#PBS -l nodes=1:ppn=8,walltime=0:05:00
#PBS -N checkOrientation

set -e
set -x

input_nii=$(jq -r .input config.json)
orientation=$(singularity exec -e docker://brainlife/fsl:5.0.9 fslorient $input_nii | tail -1)

cat <<EOF > product.json
{"orientation" : "$orientation"}
EOF
<file_sep>/README.md
# app-checkOrientation
This application checks and reports the orientation (neurological or radiological) of a nifti file.
