Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

rurban (7989)

rurban
  reversethis-{ta.yar-x} {ta} {nabrur}
http://rurban.xarch.at/

cygwin maintainer for perl, parrot, clisp, postgresql, ... and some perl modules (perl-libwin32, perl-Win32-GUI). Has also some hairy CPAN packages: B::C, B::Generate, C::DynaLib, B::Debugger ...

Journal of rurban (7989)

Monday July 02, 2007
03:44 PM

Some useful ~/bin scripts: difforig

[ #33660 ]
I found Simon Cozens entry for secret software - the stuff that lives in your ~/bin (or your /usr/local/bin if you're really brave) and never sees the light of day -, and looked into my ~/bin.

difforig originally came from the postgresql hackers, but I enhanced it to easier submit simple multifile patches in .orig-polluted working dirs. You can provide a path or multiple files.

#!/bin/sh
echo "difforig $@"
echo ""
/usr/bin/date +"%Y-%m-%d  Reini Urban <rurban@x-ray.at>"
echo ""
if [ "$#" -gt 1 -o -f "$1" ] # multiple args or a file
then
    for FILE in "$@"
    do
    ORIG="$FILE.orig"
    echo "$FILE" 1>&2
    echo "diff -ub $ORIG $FILE"
    /usr/bin/diff -ub $ORIG $FILE
    done
else
    if [ "$#" -eq 0 ]
    then    APATH="."  # no arg: recursively all origs
    else    APATH="$1" # or one arg: recursively all origs
    fi
    find "$APATH" -name '*.orig' -print | sort \
         while read FILE
    do
    NEW="`dirname $FILE`/`basename $FILE .orig`"
    echo "$NEW" 1>&2
    echo "diff -ub $ORIG $FILE"
    /usr/bin/diff -ub $FILE $NEW
    done
fi

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.