#! /bin/sh -e
## bug283373.dpatch by  <alejandro.rios@avatar.com.co>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@
diff -urNad /home/alerios/documentos/debian/patcher/patcher/patcher-0.0.20040521/patcher patcher-0.0.20040521/patcher
--- /home/alerios/documentos/debian/patcher/patcher/patcher-0.0.20040521/patcher	2004-05-21 14:27:00.000000000 -0500
+++ patcher-0.0.20040521/patcher	2005-08-03 01:06:52.131828896 -0500
@@ -749,7 +749,8 @@
 
 	if ($ENV{EDITOR}) {
 		print "NOTE: editing file $fname\n";
-		system($ENV{EDITOR}, $fname);
+		my @editor=split(/\ /,$ENV{EDITOR});
+		system(@editor, $fname);
 	} else {
 		print "\$EDITOR to $fname missing\n";
 		system("vi " . $fname);
