3
# Copyright (C) 2010 Canonical Ltd
5
# This program is free software; you can redistribute it and/or
6
# modify it under the terms of the GNU General Public License as
7
# published by the Free Software Foundation; either version 2, or (at
8
# your option) any later version.
10
# This program is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
# General Public License for more details.
15
# You should have received a copy of the GNU General Public License along
16
# with this program; if not, write to the Free Software Foundation, Inc.,
17
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19
# Authored by Chris Coulson <chris.coulson@canonical.com>
22
DISABLE_PATCHES_LIST=$1
24
if [ "x" = "x${BASEDIR}" ] ; then
28
if [ "x" = "x${DISABLE_PATCHES_LIST}" ] || [ ! -f ${DISABLE_PATCHES_LIST} ] ; then
29
if [ -f ${BASEDIR}/debian/patches/series-disable-patches.${DISABLE_PATCHES_LIST} ] ; then
30
DISABLE_PATCHES_LIST="${BASEDIR}/debian/patches/series-disable-patches.${DISABLE_PATCHES_LIST}"
32
echo "Must specify a valid list of patches to disable"
37
cp ${BASEDIR}/debian/patches/series ${BASEDIR}/debian/patches/series.orig
42
sed -ri $cmd ${BASEDIR}/debian/patches/series
43
done < ${DISABLE_PATCHES_LIST}