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:47 PM

Some useful ~/bin scripts: new-cygport

Not perl per se, but used to release updated cygwin packages, like perl, perl-libwin32, perl-Win32-GUI, ...

#!/bin/sh
# new-cygport <old-release> <new-release>
# Sample: new-cygport perl-Win32-GUI-1.0-2 perl-Win32-GUI-1.0.2-1

cp $1.cygport $2.cygport
cp $1.cygwin.patch $2.cygwin.patch
cp $1.src.patch $2.src.patch
PKG=`echo $1 | sed -e 's/\-[^\-]*\-[^\-]*$//'`
VER=`echo $1 | sed -e "s/${PKG}\-//" -e 's/\-[^\-]*$//'`
OLDBASE=${PKG}-${VER}
PKG=`echo $2 | sed -e 's/\-[^\-]*\-[^\-]*$//'`
VER=`echo $2 | sed -e "s/${PKG}\-//" -e 's/\-[^\-]*$//'`
NEWBASE=${PKG}-${VER}

sed -e "s,^--- origsrc/${OLDBASE},--- origsrc/${NEWBASE}," \
    -e "s,^+++ src/${OLDBASE},+++ src/${NEWBASE}," < $1.src.patch > $2.src.patch
sed -e "s,^--- origsrc/${OLDBASE},--- origsrc/${NEWBASE}," \
    -e "s,^+++ src/${OLDBASE},+++ src/${NEWBASE}," < $1.cygwin.patch > $2.cygwin.patch

echo cygport $2.cygport get prep make
echo nano $2/CYGWIN-PATCHES/README
echo cygport $2.cygport mkpatch install check pkg

03:44 PM

Some useful ~/bin scripts: difforig

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