drag N Drop diff new version 2-28-2012

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
User avatar
bigbass
Contributor
Contributor
Posts: 151
Joined: 13 Jan 2012, 14:35
Distribution: slackware 14

drag N Drop diff new version 2-28-2012

Post#1 by bigbass » 05 Feb 2012, 22:05

it is very easy dragndrop one file into the input box
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


Image

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

Last edited by bigbass on 29 Feb 2012, 04:38, edited 2 times in total.

User avatar
bigbass
Contributor
Contributor
Posts: 151
Joined: 13 Jan 2012, 14:35
Distribution: slackware 14

Re: drag N Drop diff new version 2-28-2012

Post#2 by bigbass » 29 Feb 2012, 04:30

rewrite :D

diffs are the best way to keep up with changes
simple and sweet

Image

User avatar
Hamza
Warlord
Warlord
Posts: 1908
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: drag N Drop diff new version 2-28-2012

Post#3 by Hamza » 29 Feb 2012, 09:59

Are you sure the Drap n' Drop works on each DE ? even fluxbox or openbox ? :wink:
NjVFQzY2Rg==

Post Reply