X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a9c0d7e288d06a43e4e3d03e3ff8496e99e80962..34e5f5eba3411855c9d3c733b6f11aa935f3d435:/ikiwiki-makerepo diff --git a/ikiwiki-makerepo b/ikiwiki-makerepo index 8d590f0c2..7f82e7177 100755 --- a/ikiwiki-makerepo +++ b/ikiwiki-makerepo @@ -29,7 +29,7 @@ if [ "$rcs" != mercurial ] && [ "$rcs" != bzr ]; then echo "repository $repository already exists, aborting" >&2 exit 1 fi - repository="$(perl -e 'use Cwd q{abs_path}; $r=shift; $r=~s/\/*$//; print abs_path($r)' "$repository")" + repository="$(perl -e 'use Cwd; $r=shift; $r=getcwd.q{/}.$r if $r!~m!^/!; print $r' "$repository")" if [ -z "$repository" ]; then echo "internal error finding repository abs_path" >&2 exit 1 @@ -128,8 +128,7 @@ darcs) fi mkdir -p "$repository" - cd "$repository" - darcs initialize + (cd "$repository" && darcs initialize) mkdir -p "$srcdir" cd "$srcdir"