Commit 16fe0853 authored by Vitaly Lipatov's avatar Vitaly Lipatov

remove obsoleted mkpatch

parent 57fb224a
#!/bin/sh
# 2003-2006, 2008 (c) Etersoft www.etersoft.ru
# Author: Vitaly Lipatov <lav@etersoft.ru>
# Public domain
# Make patch for file in $1 against CVS/SVN repository or .orig file
# load common functions, compatible with local and installed script
. `dirname $0`/../share/eterbuild/functions/common
if [ -f Makefile ] ; then
DD1=`grep ^TOPOBJDIR Makefile | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile | sed -e "s| ||g"`
DD3=`grep ^top_srcdir Makefile | sed -e "s| ||g"`
elif [ -f Makefile.in ] ; then
DD1=`grep ^TOPOBJDIR Makefile.in | sed -e "s| ||g"`
DD2=`grep ^top_builddir Makefile.in | sed -e "s| ||g"`
DD3=`grep ^top_srcdir Makefile.in | sed -e "s| ||g"`
else
warning "Can't get topdir from Makefile.in"
fi
if [ -n "$DD1" ] ; then
export $DD1
TOPDIR=$TOPOBJDIR
fi
if [ -n "$DD2" ] ; then
export $DD2
TOPDIR=$top_builddir
fi
if [ -n "$DD3" ] ; then
export $DD3
TOPDIR=$top_srcdir
fi
#test -z "$TOPDIR" && exit 1
#echo "TOPDIR: $TOPDIR"
export TOPDIR
if [ -f $1.orig ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 2 $DIFILE $PWD
diff -purN $DIFILE.orig $DIFILE > $DIFILE.patch
exit 0
fi
# a= - against rpm requires
if [ -n "$CVS" -a -d CVS ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 1 $DIFILE $PWD
a= cvs diff -u $DIFILE > $DIFILE.patch
exit 0
fi
if [ -n "$SVN" -a -d .svn ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 2 $DIFILE $PWD
a= svn diff $DIFILE > $DIFILE.patch
exit 0
fi
if [ -n "$GIT" ] ; then
DIFILE=`realpath $1`
[ -n "$TOPDIR" ] && cd "$TOPDIR"
DIFILE=${DIFILE/`realpath $PWD`\//}
#echo 2 $DIFILE $PWD
a= git diff $DIFILE | sed -e "s|^--- a/|--- |g" | sed -e "s|^\+\+\+ b/|\+\+\+ |g" > $DIFILE.patch
exit 0
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment