I'm on Mac OS X, so perhaps it's related to that. I had an SVN external that ended with a slash, e.g. /public/service_support/ When local_directory is assigned, the directory is cleaned up with sed to remove the first slash, but not the trailing slash, so it produces: public/service_support/ This then fails in do_link because ln doesn't like the trailing slash. To fix, I piped through a second sed command, like so: local_directory="$(echo ${words[0]} | sed 's,^/,,' | sed 's,/$,,')"