anchor.diff:  case $key in
       -q|--quality)
         JPGQUALITY="$2"
  +      # Two shifts because there's no shift in the loop
  +      # otherwise we can't handle just "-h" option
  +      shift
         shift
         ;;
       -h|--help)
         print_help
  +      shift
         exit 0
         ;;
       -o|--output)
         OUTDIR="$2"
         shift
  +      shift
  +      ;;
  +    -g|--gallery)
  +      CREATEGALLERY=yes
  +      shift
         ;;
       *)
  -      # unknown option
  +      break
       ;;
   esac
  -shift # past argument or value
   done
  -
  -echo $PRINTHELP
   
   # Check argument(s)
   if [ -z "$1" ]; then
  -    print_help
  -    exit 1
  +  print_help
  +  exit 1
   fi
   
   # Template to use as second argument
   if [ -z "$2" ]; then
  -    # Assume default template
  -    PTOTMPL="$DIR/gear360tmpl.pto"
  +  # Assume default template
  +  PTOTMPL="$DIR/gear360tmpl.pto"
   fi
   
   # Check if we have the software to do it (Hugin, ImageMagick)
  
positive.code:     shift
      set OUTDIR=%1
    )
  ) else (
    if %PARAMCOUNT% EQU 0 set PROTOINNAME=%_TMP%
    if %PARAMCOUNT% EQU 1 set PTOTMPL=%_TMP%
  
negative.code:     fi
  }
  
  # Function to check if a command fails, arguments:
  # - command to execute
  # Source:
  # http://stackoverflow.com/questions/5195607/checking-bash-exit-status-of-several-commands-efficiently
  run_command() {
      "$@"
  