anchor.diff:  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"
   exit 0
   
   ################################ Windows part here
  
positive.code: PTOJPGFILENAME="dummy.jpg"
  
  # Clean-up function
  function clean_up {
      if [ -d "$TEMPDIR" ]; then
          rm -rf "$TEMPDIR"
      fi
  }
  
  # Function to check if a command fails
  # http://stackoverflow.com/questions/5195607/checking-bash-exit-status-of-several-commands-efficiently
  function run_command {
      "$@"
      local status=$?
      if [ $status -ne 0 ]; then
          echo "Error while running $1" >&2
          clean_up
          exit 1
      fi
      return $status
  }
  
  # Do stuff to make this thing run on various operating systems
  # http://stackoverflow.com/questions/3466166/how-to-check-if-running-in-cygwin-mac-or-linux
  function os_check {
      case "$(uname -s)" in
  
      Darwin)
  
negative.code: type nona >/dev/null 2>&1 || { echo >&2 "Hugin required but it's not installed. Aborting."; exit 1; }
  
  # Create temporary directory locally to stay compatible with other OSes
  # Not using '-p .' might cause some problems on non-unix systems (cygwin?)
  TEMPDIR=`mktemp -d`
  
  STARTTS=`date +%s`
  # Stitch panorama (same file twice as input)
  echo "Processing input images (nona)"
  # We need to use run_command with many parameters, or $1 doesn't get
  # quoted correctly and we cannot use filenames with spaces
  run_command  "nona" "-o" "$TEMPDIR/$OUTTMPNAME" \
               "-m" "TIFF_m" \
               "-z" "LZW" \
               $PTOTMPL \
               "$1" \
               "$1"
  
  echo "Stitching input images (enblend)"
  # We need to use run_command with many parameters,
  # or the directories don't get quoted correctly
  run_command "enblend" "-o" "$OUTNAME" \
       "--compression=jpeg:$JPGQUALITY" \
       "$TEMPDIR/${OUTTMPNAME}0000.tif" \
       "$TEMPDIR/${OUTTMPNAME}0001.tif"
          
  # Clean up any files/directories we created on the way
  clean_up
  
  # Inform user about the result
  