代码拉取完成,页面将自动刷新
#!/bin/bash
die() {
echo "ERROR: $*" > /dev/stderr
patch -p0 make.conf.example < make.conf.example.diff
exit 1
}
if [[ ! -f make.conf.example || ! -f make.conf.example.x86.diff || ! -d ../.git ]]; then
echo "ERROR: current directory is invalid" > /dev/stderr
exit 1
fi
git diff --no-prefix --relative="$(basename "$(pwd)")" make.conf.example > make.conf.example.diff
git checkout -- make.conf.example
archs=()
for x in make.conf.example.*.diff; do
archs+=("$(basename ${x:18} .diff)")
done
for arch in "${archs[@]}"; do
echo "* Patching ${arch}"
cp make.conf.example make.conf.example.${arch} || die "copy failed"
patch -p0 make.conf.example.${arch} < make.conf.example.${arch}.diff > /dev/null || die "arch-patch failed"
patch -p0 make.conf.example.${arch} < make.conf.example.diff > /dev/null || die "patch failed"
done
echo "* Re-patching make.conf.example"
patch -p0 make.conf.example < make.conf.example.diff > /dev/null || die "repatch failed"
for arch in "${archs[@]}"; do
echo "* Creating diff for ${arch}"
diff -u make.conf.example make.conf.example.${arch} > make.conf.example.${arch}.diff
[[ -z ${KEEP_ARCH_MAKE_CONF_EXAMPLE} ]] && rm -f make.conf.example.${arch} make.conf.example.${arch}.orig
done
rm make.conf.example.diff
echo "Done"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。