mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
Delete .allow-ai-service and .gail-labels which are present in newer versions of libffi. libffi/ChangeLog: PR libffi/117635 * merge.sh: Delete .allow-ai-service and .gail-labels when merging new upstream versions. Signed-off-by: Pietro Monteiro <pietro@sociotechnical.xyz>
54 lines
1.0 KiB
Bash
Executable File
54 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# FIXME: do we need a license (or whatever else) header here?
|
|
|
|
# This script merges libffi sources from upstream.
|
|
|
|
# Default to the tip of master branch.
|
|
commit=${1-master}
|
|
|
|
fatal() {
|
|
echo "$1"
|
|
exit 1;
|
|
}
|
|
|
|
get_upstream() {
|
|
rm -rf upstream
|
|
git clone https://github.com/libffi/libffi.git upstream
|
|
pushd upstream
|
|
git checkout $commit || fatal "Failed to checkout $commit"
|
|
popd
|
|
}
|
|
|
|
get_current_rev() {
|
|
cd upstream
|
|
git rev-parse HEAD
|
|
}
|
|
|
|
pwd | grep 'libffi$' || \
|
|
fatal "Run this script from the libffi directory"
|
|
get_upstream
|
|
CUR_REV=$(get_current_rev)
|
|
echo Current upstream revision: $CUR_REV
|
|
|
|
# Remove the unused files.
|
|
pushd upstream
|
|
|
|
rm -rf ChangeLog.old .allow-ai-service .gail-labels .appveyor* .ci .github \
|
|
.gitignore .travis* config.guess config.sub libtool-ldflags m4 \
|
|
make_sunver.pl msvc_build
|
|
|
|
rm -rf .git autogen.sh
|
|
cp -a . ..
|
|
popd
|
|
|
|
rm -rf upstream
|
|
|
|
# Update the MERGE file.
|
|
cat << EOF > MERGE
|
|
$CUR_REV
|
|
|
|
The first line of this file holds the git revision number of the
|
|
last merge done from the master library sources.
|
|
EOF
|