• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2# This library is free software; you can redistribute it and/or
3# modify it under the terms of the GNU Lesser General Public
4# License as published by the Free Software Foundation version 2.1
5# of the License.
6#
7# Copyright(c) 2023 Huawei Device Co., Ltd.
8
9set -e
10if [ "$1" == "" ] || [ "$2" == "" ]; then
11    exit 1
12fi
13
14if [ -d "$2" ]; then
15    rm -rf "$2"
16fi
17
18mkdir -p $2
19
20tar zxvf $1/expat-2.4.1.tar.gz -C $2
21
22files=$(ls $1/*.patch)
23
24for filename in $files
25do
26  filenamebase=$(basename "$filename")
27  patch -d $2/expat-2.4.1 -p1 < $1/$filenamebase --fuzz=0 --no-backup-if-mismatch
28done
29exit 0
30