2024-02-18 12:23:08 -07:00
|
|
|
{
|
|
|
|
tea,
|
|
|
|
gh,
|
|
|
|
hut,
|
2023-09-12 08:44:05 -06:00
|
|
|
}:
|
|
|
|
let
|
2023-01-10 18:35:29 -07:00
|
|
|
teaBin = "${tea}/bin/tea";
|
|
|
|
ghBin = "${gh}/bin/gh";
|
2023-05-17 08:13:45 -06:00
|
|
|
htBin = "${hut}/bin/hut";
|
2023-09-12 08:44:05 -06:00
|
|
|
in
|
|
|
|
''
|
2023-01-10 18:35:29 -07:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
2023-05-17 08:13:45 -06:00
|
|
|
source ~/.config/op/plugins.sh
|
|
|
|
|
2023-01-10 18:35:29 -07:00
|
|
|
proj="$(basename $PWD)"
|
|
|
|
|
|
|
|
for login in $(${teaBin} logins list -o simple | awk '{print $1}'); do
|
|
|
|
tea logins default "$login"
|
|
|
|
tea repos create -name "$proj" || echo "error creating '$proj' on '$login'"
|
|
|
|
done
|
|
|
|
|
|
|
|
# ${ghBin}
|
2023-05-17 08:13:45 -06:00
|
|
|
gh repo create --public "$proj" || echo "error creating '$proj' on 'github'"
|
|
|
|
|
|
|
|
# ${htBin}
|
|
|
|
${htBin} git create "$proj" || echo "error creating '$proj' on 'sr.ht'"
|
2023-01-10 18:35:29 -07:00
|
|
|
|
2023-05-31 22:15:35 -06:00
|
|
|
git config --unset-all remote.origin.url || echo "no remote defined..."
|
2023-09-25 14:36:25 -06:00
|
|
|
for repo in "git@github.com:qbit/%s.git" "git@gitle.otter-alligator.ts.net:%s" "ssh://gitea@git.tapenet.org:2222/qbit/%s.git" "git@codeberg.org:qbit/%s.git" "git@git.sr.ht:~qbit/%s"; do
|
2023-05-17 18:26:02 -06:00
|
|
|
echo "Adding remote: $(printf $repo $proj)"
|
|
|
|
git config --add remote.origin.url "$(printf $repo $proj)"
|
|
|
|
done
|
|
|
|
|
2023-01-10 18:35:29 -07:00
|
|
|
''
|