anchor.diff:  shift # past argument or value
   done
   
  +echo $PRINTHELP
  +
   # Check argument(s)
   if [ -z "$1" ]; then
  -    echo "Small 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 INNAME [outputfile] [hugintemplate]\n"
  -    echo "Where INNAME is a panorama file from camera,"
  -    echo "output parameter and hugintemplate are optional."
  +    print_help
       exit 1
   fi
   
  
positive.code: # Inform user about the result
  ENDTS=`date +%s`
  RUNTIME=$((ENDTS-STARTTS))
  echo Panorama written to $OUTNAME, took: $RUNTIME s
  
  # Uncomment this if you don't do videos; otherwise, it is quite annoying
  #notify-send "Panorama written to $OUTNAME, took: $RUNTIME s"
  
negative.code:   clean_up
  }
  
  print_help() {
    echo "Small 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 "be a wildcard (ex. *.JPG)."
    echo "output parameter and hugintemplate are optional, defaults will"
    echo -e "be assumed if they are not given\n"
    echo "-q|--quality will set the JPEG quality to QUALITY"
    echo "-h|--help    prints help"
  }
  
  # https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash
  while [[ $# -gt 0 ]]
  do
  key="$1"
  
  echo Key: $key
  
  case $key in
      -q|--quality)
        JPGQUALITY="$2"
        shift # past argument
        ;;
      -h|--help)
        print_help
        exit 0
        ;;
      *)
        # unknown option
  