6aaf7a1e75
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@2331 127b21dd-08f5-0310-b4b7-95ae10353056
37 lines
652 B
Bash
Executable File
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;
|
|
|