anchor.diff:  ################################ Linux part here
   
   # http://stackoverflow.com/questions/59895/can-a-bash-script-tell-which-directory-it-is-stored-in
  -# Or dirname `dirname $0`
  -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  -
  +DIR=$(dirname `which $0`)
   PTOTMPL="$DIR/gear360tmpl.pto"
   OUTTMPNAME="out"
   OUTNAME=$2
  
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: 
  # Output name as second argument
  if [ -z "$2" ]; then
      #The output needs to be done in the folder of the original file if used via nautlius open-with
      OUTNAME=`dirname "$1"`/`basename "${1%.*}"`_pano.jpg
  fi
  
  # OS check, custom settings for various OSes
  