1 #!/bin/bash |
|
2 # |
|
3 # CDDL HEADER START |
|
4 # |
|
5 # The contents of this file are subject to the terms of the |
|
6 # Common Development and Distribution License (the "License"). |
|
7 # You may not use this file except in compliance with the License. |
|
8 # |
|
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 # or http://www.opensolaris.org/os/licensing. |
|
11 # See the License for the specific language governing permissions |
|
12 # and limitations under the License. |
|
13 # |
|
14 # When distributing Covered Code, include this CDDL HEADER in each |
|
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 # If applicable, add the following below this CDDL HEADER, with the |
|
17 # fields enclosed by brackets "[]" replaced with your own identifying |
|
18 # information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 # |
|
20 # CDDL HEADER END |
|
21 # |
|
22 # |
|
23 # Copyright 2009, 2010, Oracle and/or its affiliates. All rights reserved. |
|
24 # |
|
25 # ident "@(#)apply_patches.sh 1.2 10/11/08 SMI" |
|
26 |
|
27 |
|
28 PATCHDB="patches.applied" |
|
29 mkdir -p ${PATCHDB} |
|
30 |
|
31 for file in \ |
|
32 bash41-001 \ |
|
33 bash41-002 \ |
|
34 bash41-003 \ |
|
35 bash41-004 \ |
|
36 bash41-005 \ |
|
37 bash41-006 \ |
|
38 bash41-007 \ |
|
39 bash41-008 \ |
|
40 bash41-009 |
|
41 |
|
42 do |
|
43 if [ ! -f ${PATCHDB}/${file}.applied ] ; then |
|
44 echo "Applying upstream bash 4.1 patch ${file}." |
|
45 gpatch -p0 < ../Patches-4.1/${file} || exit 1 |
|
46 touch ${PATCHDB}/${file}.applied |
|
47 else |
|
48 echo "Patch ${file} has already been applied." |
|
49 fi |
|
50 done |
|
51 |
|
52 for file in \ |
|
53 config.h.in.0.diff \ |
|
54 config-top.h.1.diff \ |
|
55 Makefile.in.3.diff \ |
|
56 glob.c.4.diff \ |
|
57 snprintf.c.5.diff \ |
|
58 variables.c.6.diff \ |
|
59 signames.c.7.diff \ |
|
60 rlprivate.h.8.diff \ |
|
61 xmbsrtowcs.c.9.diff \ |
|
62 configure.10.diff \ |
|
63 input.c.11.diff \ |
|
64 input_avail.c.12.diff \ |
|
65 rlconf.h.13.diff \ |
|
66 bashref.info.14.diff \ |
|
67 bash.man.15.diff \ |
|
68 rbash.man.16.diff |
|
69 do |
|
70 if [ ! -f ${PATCHDB}/${file}.applied ] ; then |
|
71 echo "Applying Solaris patch ${file}." |
|
72 gpatch -p0 < ../Solaris/diffs/${file} || exit 1 |
|
73 touch ${PATCHDB}/${file}.applied |
|
74 else |
|
75 echo "Patch ${file} has already been applied." |
|
76 fi |
|
77 done |
|
78 |
|
79 touch .patched |
|
80 |
|
81 exit 0 |
|
82 |
|