From 4e39769f07e65f7d7e3cb903b8d8b3a5812e267b Mon Sep 17 00:00:00 2001 From: bringert Date: Thu, 24 Nov 2005 13:05:27 +0000 Subject: Include darcs-cm wrapper. --- doc/darcs.html | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'doc/darcs.html') diff --git a/doc/darcs.html b/doc/darcs.html index 9c3b43262..e61f3b00c 100644 --- a/doc/darcs.html +++ b/doc/darcs.html @@ -233,42 +233,11 @@ You may want to create a script or alias for starting the connection.

Automating the ControlMaster connection

-You can create a darcs wrapper which sets up a ControlMaster connection -if there isn't one already. Put the code below in for example ~bin/darcs-cm, -and use that program instead of darcs to work with the repository. +You can use a darcs wrapper which sets up a ControlMaster connection +if there isn't one already. Put the script darcs-cm +somewhere on your path and use it instead of darcs to work with +the remote repository.

-
-  #!/bin/bash
-  
-  DARCS=`which darcs`
-  SSH=`which ssh`
-  REPOSERVER=gfreposerver
-  
-  if [ ! -x "$SSH" ]; then
-    echo "ssh ($SSH): command not found" 1>&2
-    exit 1
-  fi
-  
-  if [ "$1" = "--stop" ]; then
-    $SSH -O exit "$REPOSERVER"
-    exit $?
-  fi
-  
-  if [ ! -x "$DARCS" ]; then
-    echo "darcs ($DARCS): command not found" 1>&2
-    exit 1
-  fi
-  
-  if ! $SSH -O check "$REPOSERVER" >& /dev/null; then
-    echo "Connection to $REPOSERVER is down, connecting..."
-    $SSH -f -M "$REPOSERVER" \
-       "bash -c 'while true; do echo -n .; sleep 30; done'" > /dev/null
-    sleep 1
-  fi
-  
-  exec $DARCS "$@"
-
-

Getting a fresh copy

-- cgit v1.2.3