forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
in case i forget how to do this, can be deleted afterwards
- Loading branch information
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/sh | ||
|
||
set -x | ||
set -e | ||
set -u | ||
|
||
# get current stuff | ||
git clone [email protected]:ansible/ansible.git ansible_unified | ||
cd ansible_unified/ | ||
git submodule init | ||
git submodule update | ||
|
||
# add submodules as remotes | ||
git remote add core_modules [email protected]:ansible/ansible-modules-core.git | ||
git remote add extras_modules [email protected]:ansible/ansible-modules-extras.git | ||
git fetch --all | ||
|
||
# remove submodules | ||
echo "" > .gitmodules | ||
git add .gitmodules | ||
git rm --cached lib/ansible/modules/core/ | ||
git rm --cached lib/ansible/modules/extras/ | ||
git commit -am "removed core and extras submodules" | ||
rm -rf lib/ansible/modules/core | ||
rm -rf lib/ansible/modules/extras | ||
|
||
# merge remotes into old submodule dirs | ||
## core | ||
git merge -s ours --allow-unrelated-histories --no-commit core_modules/devel | ||
git read-tree --prefix=lib/ansible/modules/core -u core_modules/devel | ||
git commit -am 'core modules back to main repo' | ||
## extras | ||
git merge -s ours --allow-unrelated-histories --no-commit extras_modules/devel | ||
git read-tree --prefix=lib/ansible/modules/extras -u extras_modules/devel | ||
git commit -am 'extras modules back to main repo' |