Sorry, I should have been more verbose with the description of my shell script.
So am I to take it that intercepting and altering the path isn't possible in a simple wrapper script? Thanks, Matt Daniel Shahaf <d...@daniel.shahaf.name> wrote: svn+ssh://host/some/path/here runs 'ssh host svnserve -t' and the path is passed within the ra_svn protocol. Next time please don't make me have to reverse engineer a shell script in order to answer such a simple question :) Matthew Beals wrote on Fri, Sep 09, 2011 at 21:13:01 -0400: > I have two sets of repos setup... common repos and user repos. On the machine > acting as the svn host, I have the common repos stored in /repos while the > user repos are in /home/<username>/.repos/ > > I'm attempting to simplify svn+ssh access such that: > > svn+ssh://<server>/Code/some_project_repo serves up > /repos/Code/some_project_repo > svn+ssh://<server>/<username>/some_project_repo serves up > /home/<username>/.repos/some_project_repo > > I took the example of writing a shell script in /usr/local/bin that sets the > umask and calls svnserve and modified it to include this path tinkering. Here > is that script: > > ############################################## > #!/bin/bash > > umask 002 > > PATH="$@" > ROOT="/repos" > USER=`echo $PATH | /bin/sed "s/^\/\([a-z]*\)\/.*/\1/"` > PATTERN="^$USER:" > > if `/usr/bin/ypcat passwd | /bin/egrep -q $PATTERN` ; then > ROOT="/home/$USER/.repos" > PATTERN="s/\/$USER//" > PATH=`echo $PATH | /bin/sed $PATTERN` > fi > > exec /usr/bin/svnserve "$PATH" -r "$ROOT" > ################################################################# > > It just compares the first directory passed in against the users in the NIS > domain and if it finds a match, builds a new Path and root path to the repos. > It works just fine on the command line when I pass it paths and echo back out > the parts, but when I attempt to actually run it (by accessing a repo with > svn+ssh), $PATH does not get set to the path being passed in... it is just > set to '-t'. However, when I try to access a common repo (where PATH is left > unadulterated), it serves up the repo just fine. Is the path being passed > encoded somehow? Is there are way to access it? > > thanks, > Matt > >_____________________________________________ > Matthew Beals > Michigan Technological University > Department of Atmospheric Sciences > 1400 Townsend Drive > B019a Fisher Hall > Houghton, MI 49931 > mjbe...@mtu.edu