27 lines
533 B
Bash
Executable file
27 lines
533 B
Bash
Executable file
#!/usr/bin/env zsh
|
|
|
|
|
|
newURL="$1"
|
|
|
|
tmpDir="tmp-repo-$$"
|
|
mkdir $tmpDir
|
|
cd $tmpDir
|
|
|
|
for repoURL in $(< ../repos-urls); do
|
|
newRepoURL="$newURL/$(echo $repoURL|sed 's#.*/##')"
|
|
echo $repoURL ' => ' $newRepoURL
|
|
> README.md << END
|
|
This repository has moved to $newRepoURL
|
|
|
|
migrated with https://gitlab.esy.fun/yogsototh/gh-notify-move
|
|
END
|
|
git init
|
|
git remote add origin $repoURL
|
|
git add README.md
|
|
git commit -m "Moved with gh-notify-move"
|
|
git push -uf origin master
|
|
rm -rf .git
|
|
done
|
|
|
|
cd ..
|
|
rm -rf $tmpDir
|