then dragndrop the second file you want to compare it to
thats it
it will auto make a diff and save it in $HOME
the diff result gets auto opened with your default text editor
I use this one a lot and thought to share
Joe
Code: Select all
#!/bin/sh
# Joe Arose
# improved dnd diff
# used with KDE or desktops that add file:// to the name
#------------------------------------------------
SEL=`Xdialog \
--title "diff tool" \
--separator "\n" --stdout \
--2inputsbox "dnd diff" 0 0 \
"this is the original file to diff" "$1" \
"this is the changed file to diff " "$2" `
# lets get the two values in 2 separate arrays
SEL_ARRARY=($SEL)
ORIGINAL_FILE=${SEL_ARRARY[0]}
CHANGED_FILE=${SEL_ARRARY[1]}
#------------------------------------------------
removed_prefix_file_one=`echo ${ORIGINAL_FILE#file://}`
removed_prefix_file_two=`echo ${CHANGED_FILE#file://}`
diff -pruN $removed_prefix_file_one $removed_prefix_file_two >$HOME/`basename $ORIGINAL_FILE`.patch
xdg-open $HOME/`basename $ORIGINAL_FILE`.patch