moby/apply-patches

35 lines
571 B
Plaintext
Raw Normal View History

#!/bin/bash
# Description: This shell script is used to apply patches for the project
# Author: zhangzhihui@xfusion.com
# Create: 2023-03-27
set -ex
2023-04-10 12:38:50 +08:00
pkg=moby-20.10.24
cwd=$PWD
src=$cwd/$pkg
if [ ! -d patch ];then
tar -xzf patch.tar.gz
fi
cd $src
git init
git add .
git config user.name 'build'
git config user.email 'build@obs.com'
git commit -m "init build"
cd $cwd
series=$cwd/series.conf
while IPF=read -r line
do
if [[ "$line" =~ ^patch* ]];then
echo git apply $cwd/$line
cd $src && git apply $cwd/$line
fi
done < "$series"
mv $src/.git $src/git