代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/erlang 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/bash
# Usage:
# ./otp-get-patches.sh /path/to/otp OTP_R14B02 fedora-R14B02
#
# otp-get-patches.sh - update erlang.spec and otp-00*.patch files
#
# otp-get-patches.sh updates the erlang.spec and otp-00*.patch
# files in the git index. After an otp-get-patches.sh run, you
# will need to review the staged git changes, possibly adapt the
# 'Release:' and '%changelog' parts of erlang.spec, and can then
# "git commit" everything.
#
# Caution: Leave the four special comment lines untouched in the
# spec file, as otp-get-patches.sh requires them and will only
# touch the parts of erlang.spec between the respective start/end
# comment pair:
#
# # start of autogenerated patch tag list
# # end of autogenerated patch tag list
# Command line parsing
otp_dir="${1:?'Fatal: otp git repo dir required'}"
otp_upstream="${2:?'Fatal: git ref to upstream release required'}"
otp_fedora="${3:?'Fatal: git ref to branch with fedora patches required'}"
# Setup
set -e
# set -x
tmpdir="$(mktemp -d --tmpdir="$PWD")"
# Generate patch files
pushd "$otp_dir"
git format-patch -N --no-signature --no-stat -o "$tmpdir" "${otp_upstream}..${otp_fedora}" > "$tmpdir/patch-list.txt"
popd
test -s "$tmpdir/patch-list.txt"
# Process patch files
echo "# start of autogenerated patch tag list" > "$tmpdir/patch-list-tags.txt"
n=1
while read patch
do
otppatch="$(dirname "$patch")/otp-$(basename "$patch")"
${SED-sed} -e '1d' -e '/^-- $/,$d' "$patch" > "$otppatch"
rm -f "$patch"
echo "Patch$n: $(basename "$otppatch")" >> "$tmpdir/patch-list-tags.txt"
n=$(($n + 1))
done < "$tmpdir/patch-list.txt"
echo "# end of autogenerated patch tag list" >> "$tmpdir/patch-list-tags.txt"
# Create updated spec file
specfile="erlang.spec"
newspec1="${tmpdir}/${specfile}.new1"
sed '/^# start of autogenerated patch tag list$/,$d' "$specfile" > "$newspec1"
cat "$tmpdir/patch-list-tags.txt" >> "$newspec1"
sed '1,/^# end of autogenerated patch tag list/d' "$specfile" >> "$newspec1"
# Actually put all changes into git index
git rm -f otp-00*.patch
mv "$tmpdir/otp-00"*.patch .
git add otp-00*.patch
mv -f "$newspec1" "$specfile"
git add "$specfile"
rm -rf "$tmpdir"
# End of file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。