DARCS=" " GIT=" " TMPDIR=" " ulimit -c 0 rm -rf $TMPDIR $DARCS pull --all --quiet --matches="hash " --posthook=': > '"${TMPDIR}darcs_files.txt"' ; for fnl in "$DARCS_FILES" ; do echo -n "$fnl" >> '"${TMPDIR}darcs_files.txt"' ; done' || exit 1 sed -E -e 's%^\./%%' ${TMPDIR}darcs_files.txt | \ sed -E -e $'s%(\\$|`|"|\\\\)%\\\\\\1%g' \ -e $'s%\'%\"\'\"%g' | \ awk '{ printf " \"%s\"", $0 }' \ > ${TMPDIR}darcs_files.args { echo -n "$GIT add --all" ; cat ${TMPDIR}darcs_files.args ; } > ${TMPDIR}git-add.sh sh -x ${TMPDIR}git-add.sh || exit 1 echo -n "$GIT commit --allow-empty -m " > ${TMPDIR}git_commit.cmd cat >> ${TMPDIR}git_commit.cmd << '-EOF-' !:&#_ !:&#_ -m !:&#_ !:&#_ --author=!:&#_ darcs2git <> < > <> darcs2git !:&#_ --date=!:&#_ !:&#_ -EOF- sed -E -e $'s%(\\$|`|"|\\\\)%\\\\\\1%g' \ -e $'s%\'%\"\'\"%g' \ -e 's%!:&#_%"%g' ${TMPDIR}git_commit.cmd \ > ${TMPDIR}git-commit.sh truncate -s -1 ${TMPDIR}git-commit.sh cat ${TMPDIR}darcs_files.args >> ${TMPDIR}git-commit.sh sh -x ${TMPDIR}git-commit.sh || exit 1