oolite/debian/apply-patches
Michael Werle 77703f89b6 Significant changes to the Debian build rules, largely copied from Darren
Salt's work from Bug #14126.

To build run 'debuild binary' in the root and to clean 'debuild clean'.


git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@1837 127b21dd-08f5-0310-b4b7-95ae10353056
2008-11-07 01:12:48 +00:00

37 lines
652 B
Bash
Executable File

#!/bin/sh
#
# Quick and dirty patching script.
# Copyright (C) 2007 Chris Crowther <hikari@hikari.org.uk>
#
# Additional Changes: Michael Werle <micha@michaelwerle.com>
#
# History:
# 2008.11.02 MKW Auto-read all patches from patch directory
#
# $Id$
#
PATCHES=`ls -1 debian/patches`
FLAGS=""
while getopts ":R" option
do
case $option in
R)
if test -f patch; then
echo "Patches have been applied: reversing."
export FLAGS="$FLAGS -R";
else
echo "Patches have not been applied: not reversing."
exit 0;
fi
;;
esac
done
echo "Using patch flags: $FLAGS"
for PATCH in $PATCHES; do
patch $FLAGS -p0 < debian/patches/$PATCH
done;