1 Star 0 Fork 0

feiser/treble_experimentations

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
apply-patches.sh 713 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -e
patches="$(readlink -f -- $1)"
for project in $(cd $patches/patches; echo *);do
p="$(tr _ / <<<$project |sed -e 's;platform/;;g')"
[ "$p" == build ] && p=build/make
repo sync -l --force-sync $p || continue
pushd $p
git clean -fdx; git reset --hard
for patch in $patches/patches/$project/*.patch;do
#Check if patch is already applied
if patch -f -p1 --dry-run -R < $patch > /dev/null;then
continue
fi
if git apply --check $patch;then
git am $patch
elif patch -f -p1 --dry-run < $patch > /dev/null;then
#This will fail
git am $patch || true
patch -f -p1 < $patch
git add -u
git am --continue
else
echo "Failed applying $patch"
fi
done
popd
done
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Android
1
https://gitee.com/feiser/treble_experimentations.git
git@gitee.com:feiser/treble_experimentations.git
feiser
treble_experimentations
treble_experimentations
master

搜索帮助