runc/apply-patch
xiadanni1 ab5af31922 runc: use git-commit to store commit ID
Change-Id: Ib43bafb0ec680082520d85530ef783b68bc08671
Signed-off-by: xiadanni1 <xiadanni1@huawei.com>
2020-06-12 01:19:00 +08:00

28 lines
531 B
Bash
Executable File

#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2018-2019. All rights reserved.
# Description: This shell script is used to apply patches for the project
# Author: jingrui@huawei.com
# Create: 2019-03-02
pkg=runc-1.0.0-rc3
cwd=$PWD
src=$cwd/$pkg
unzip $pkg.zip
if [ ! -d patch ];then
tar -xzf patch.tar.gz
fi
series=$cwd/series.conf
while IPF= read -r line
do
if [[ "$line" =~ ^0.* ]]; then
cd $src && patch -p1 < $cwd/patch/$line
fi
done <"$series"
cd $cwd
cp -rf $src/* .
rm -rf runc-1.0.0-rc3