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
fi
mkdir -p "$repository"
- cd "$repository"
- darcs initialize
+ (cd "$repository" && darcs initialize)
mkdir -p "$srcdir"
cd "$srcdir"
# 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"
;;
*)