#!/bin/sh
CURRENT1=$1
CURRENT2=$2
NEW=$3
CURRENTARCHOPT=$4
EMACS="emacsclient -c"
if [ x$CURRENTARCHOPT = x ]; then
	  $EMACS --eval "(emerge-files nil \"$CURRENT1\" \"$CURRENT2\" \"$NEW\")"
else
	  $EMACS --eval "(emerge-files-with-ancestor nil \"$CURRENT1\" \"$CURRENT2\" \"$CURRENTARCHOPT\" \"$NEW\")"
fi
