#!/bin/sh

# An example of how to treat the arguments to a PRCS_MERGE_COMMAND.

#echo Merge script called with args:
#echo "Working label:  $1"
#echo "Working file:   $2"
#echo "Common label:   $3"
#echo "Commonfile:     $4"
#echo "Selected label: $5"
#echo "Selected file:  $6"
#echo "Output file:    $7"

if test $4 = /dev/null; then
  echo Running diff -u instead of diff3--edit this file.
  exec gdiff -u "-L$1" "$2" "-L$5" "$6" > "$7"
else
  exec gdiff3 -maE "-L$1" "$2" "-L$3" "$4" "-L$5" "$6" > "$7"
fi
