summaryrefslogtreecommitdiff
path: root/scripts/git-clone-my
blob: e8a0b593e47fe9cffb78850e49745df987066126 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

# Clone one of my git repositories and setup multiple remote
# Usage: git-clone-my REPO

pull_remote="git@tronto.net:"
push="git@tronto.net: git@github.com:sebastianotronto/"

if [ -z "$1" ]; then
	echo "git-clone-my: please specify a valid repository"
fi

git clone "$pull_remote"$1.git || exit 1
cd $1
for repo in $push; do
	git remote set-url --push --add origin "$repo"$1.git
done

Generated with cgit - Back to sebastiano.tronto.net