X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2cf63041acc2051d55e0150b3a5b00ed454ae76d..48a5f9f2d8daef8c16b3e4b00511e00eaa0fa024:/ikiwiki-makerepo?ds=sidebyside diff --git a/ikiwiki-makerepo b/ikiwiki-makerepo index 787611ac1..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" @@ -143,7 +142,7 @@ darcs) # set up master repo's apply hook and tell user to adjust it if desired darcsdefaults="$repository/_darcs/prefs/defaults" echo "Preconfiguring apply hook in $darcsdefaults - adjust as desired!" - echo "apply posthook $repository/_darcs/ikiwrapper" >> "$darcsdefaults" + echo "apply posthook $repository/_darcs/ikiwiki-wrapper" >> "$darcsdefaults" echo "apply run-posthook" >> "$darcsdefaults" ;; *)