anchor.diff:      exit 1
   fi
   
  -# Template to use as third argument
  -if [ -z "$3" ]; then
  +# Template to use as second argument
  +if [ -z "$2" ]; then
       # Assume default template
       PTOTMPL="$DIR/gear360tmpl.pto"
   fi
  
positive.code: rem There are problems with -delete_original in exiftool, manually remove the file
  del %LOCALOUTNAME%_original
  exit /b 0
  
  :END
  
negative.code: }
  
  print_help() {
    echo -e "\nSmall script to stitch raw panorama files."
    echo "Raw meaning two fisheye images side by side."
    echo -e "Script originally writen for Samsung Gear 360.\n"
    echo -e "Usage:\n$0 [-q|--quality QUALITY] infile [outputfile] [hugintemplate]\n"
    echo "Where infile is a panorama file from camera, it can"
    echo -e "be a wildcard (ex. *.JPG). hugintemplate is optional.\n"
    echo "Panorama file will be written to a file with appended _pano,"
    echo -e "example: 360_010.JPG -> 360_010_pano.JPG\n"
    echo "-q|--quality will set the JPEG quality to QUALITY"
    echo "-o|--output  will set the output directory of panoramas"
    echo "             default: current directory"
    echo "-h|--help    prints help"
  }
  
  