mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-03 20:40:34 +01:00
contrib: add "git-subtree-reimport.sh" script
This commit is contained in:
parent
2d891741aa
commit
8b20d2a856
1 changed files with 33 additions and 0 deletions
33
contrib/scripts/git-subtree-reimport.sh
Executable file
33
contrib/scripts/git-subtree-reimport.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
cd "$(dirname "$(readlink -f "$0")")/../.."
|
||||
|
||||
reimport() {
|
||||
local d="$1"
|
||||
local project
|
||||
local branch
|
||||
|
||||
if [[ "$d" = c-* ]] ; then
|
||||
project=c-util
|
||||
branch=main
|
||||
else
|
||||
project=nettools
|
||||
branch=master
|
||||
fi
|
||||
|
||||
git subtree pull --prefix "src/$d" "git@github.com:$project/$d.git" "$branch" --squash -m \
|
||||
"$d: re-import git-subtree for 'src/$d'
|
||||
|
||||
git subtree pull --prefix src/$d git@github.com:$project/$d.git $branch --squash
|
||||
"
|
||||
}
|
||||
|
||||
reimport_all() {
|
||||
for d in c-list c-rbtree c-siphash c-stdaux n-acd n-dhcp4 ; do
|
||||
reimport "$d"
|
||||
done
|
||||
}
|
||||
|
||||
reimport_all
|
||||
Loading…
Add table
Reference in a new issue