X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/2cf63041acc2051d55e0150b3a5b00ed454ae76d..b9f4708f682be0002c0ece9029860c17333590e4:/ikiwiki-makerepo 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" ;; *)