Skip to content
Snippets Groups Projects
Commit 220398e8 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Added --use-ssh option to the setup script.

parent 5dcf2043
No related branches found
No related tags found
No related merge requests found
Cloning into 'master-clone'...
Cloning into 'mirror-clone'...
...@@ -12,9 +12,18 @@ esac ...@@ -12,9 +12,18 @@ esac
good=0 good=0
cd test-git || exit 1 cd test-git || exit 1
rm -rf $what-clone rm -rf $what-clone
if [ -f use_ssh ]
then
use_ssh=ssh://localhost/`pwd`/
else
use_ssh=
fi
while : while :
do do
git clone $what.git $what-clone >$what.out 2>$what.err || exit 1 git clone ${use_ssh}$what.git $what-clone >$what.out 2>$what.err || exit 1
if [ -s $what.err ] if [ -s $what.err ]
then then
echo unexpected stderr from git clone: echo unexpected stderr from git clone:
......
#!/bin/sh #!/bin/sh
mkdir test-git || exit 1 mkdir test-git || exit 1
cd test-git cd test-git
if [ x"$1" = x"--use-ssh" ]
then
touch use_ssh
use_ssh=ssh://localhost/`pwd`/
else
use_ssh=
fi
mkdir master.git mkdir master.git
(cd master.git && git init --bare) (cd master.git && git init --bare)
git clone master.git committer git clone ${use_ssh}master.git committer
(cd committer && (cd committer &&
touch foo && touch foo &&
git add foo && git add foo &&
git commit -m"Initial commit" && git commit -m"Initial commit" &&
git push origin master) git push origin master)
git clone --mirror master.git mirror.git git clone --mirror ${use_ssh}master.git mirror.git
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment