summaryrefslogtreecommitdiff
path: root/git.liw.fi.sh
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2013-10-05 23:00:28 +0100
committerLars Wirzenius <liw@liw.fi>2013-10-05 23:00:28 +0100
commit7adcf9315cf08217a1a5948258c0c2cd58b2d7d7 (patch)
treecd293a5e22a8d1ad38344e269eefb06fa60d58bd /git.liw.fi.sh
parent3f50542bd02d66714dc665752c9e0bc153494fe6 (diff)
downloadliw-gitano-acl-test-suite-7adcf9315cf08217a1a5948258c0c2cd58b2d7d7.tar.gz
Test suite improvements
Diffstat (limited to 'git.liw.fi.sh')
-rw-r--r--git.liw.fi.sh49
1 files changed, 47 insertions, 2 deletions
diff --git a/git.liw.fi.sh b/git.liw.fi.sh
index c893698..6f1163c 100644
--- a/git.liw.fi.sh
+++ b/git.liw.fi.sh
@@ -1,10 +1,55 @@
gitano()
{
- ssh "$GITANO" "$@"
+ local keyname="$1"
+ shift
+ if [ "$keyname" = "liw" ]
+ then
+ ssh "$GITANO" "$@"
+ else
+ SSH_AUTH_SOCK= ssh -F "ssh.conf" -i "$keyname.key" "$GITANO" "$@"
+ fi
}
die()
{
echo "$@" 1>&2
exit 1
-} \ No newline at end of file
+}
+
+attempt()
+{
+ if "$@" > "$DATADIR/attempt.stdout" 2> "$DATADIR/attempt.stderr"
+ then
+ echo 0 > "$DATADIR/attempt.exit"
+ else
+ echo $? > "$DATADIR/attempt.exit"
+ fi
+}
+
+clone_using_git()
+{
+ local dir="$1/$2"
+ local url="git://$GITHOST/$2"
+ rm -rf "$dir"
+ mkdir -p "$dir"
+ if [ "$1" = liw ]
+ then
+ git clone "$url" "$dir"
+ else
+ SSH_AUTH_SOCK= git clone "$url" "$dir"
+ fi
+}
+
+clone_using_ssh()
+{
+ local dir="$1/$2"
+ local url="ssh://$GITANO/$2"
+ rm -rf "$dir"
+ mkdir -p "$dir"
+ if [ "$1" = liw ]
+ then
+ git clone "$url" "$dir"
+ else
+ PATH="$SRCDIR:$PATH" git clone "$url" "$dir"
+ fi
+}