tools: Support import from any branch

This commit is contained in:
klzgrad 2022-05-04 01:41:30 +08:00
parent 1b31c2c6df
commit e45001c0d0
3 changed files with 7 additions and 3 deletions

View File

@ -5,7 +5,7 @@
*_perftest.cc
*_test.cc
*fuzz*
*src/org/chromium*
*org/chromium*
*.golden
*.javap*
*.pyc

View File

@ -9,11 +9,12 @@ name="chromium-$want_version"
tarball="$name.tar.xz"
url="https://commondatastorage.googleapis.com/chromium-browser-official/$tarball"
root=$(git rev-list --max-parents=0 HEAD)
branch=$(git branch --show-current)
git config core.autocrlf false
git config core.safecrlf false
git -c advice.detachedHead=false checkout $root
rm -rf src
git checkout master -- tools
git checkout "$branch" -- tools
sed -i "s/^\^/$name\//" tools/include.txt
if [ -f "/tmp/$tarball" ]; then
cat "/tmp/$tarball" | tar xJf - --wildcards --wildcards-match-slash -T tools/include.txt -X tools/exclude.txt
@ -24,4 +25,4 @@ mv "$name" src
git rm --quiet --force -r tools
git add src
git commit --quiet --amend -m "Import $name" --date=now
git rebase --onto HEAD "$root" master
git rebase --onto HEAD "$root" "$branch"

View File

@ -24,6 +24,9 @@
^chrome/android/profiles/newest.txt
^chrome/app/theme/chromium/BRANDING
^chrome/build/*.txt
^components/cronet
^components/grpc_support
^components/prefs
^components/version_info
^crypto
^ipc/ipc_param_traits.h