diff options
author | Thomas Haller <thaller@redhat.com> | 2022-07-19 08:43:14 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-07-19 08:53:47 +0200 |
commit | 8b20d2a8560a2dc345b149043ddf154d0a5a1744 (patch) | |
tree | 72eeceac0d59c0433efbe6bc4a2000d73653e8c9 | |
parent | 2d891741aa5c4d8e239d05d73691800ec9647c33 (diff) | |
download | NetworkManager-8b20d2a8560a2dc345b149043ddf154d0a5a1744.tar.gz |
contrib: add "git-subtree-reimport.sh" script
-rwxr-xr-x | contrib/scripts/git-subtree-reimport.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/contrib/scripts/git-subtree-reimport.sh b/contrib/scripts/git-subtree-reimport.sh new file mode 100755 index 0000000000..7de3436adb --- /dev/null +++ b/contrib/scripts/git-subtree-reimport.sh @@ -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 |