diff options
Diffstat (limited to 'process_directory.sh')
-rwxr-xr-x | process_directory.sh | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/process_directory.sh b/process_directory.sh index 54c51cf..c9ff6e6 100755 --- a/process_directory.sh +++ b/process_directory.sh @@ -1,25 +1,31 @@ #!/bin/bash +command=' + sed -re "s/^\(paludis (0.1.*)\)$/Package-manager: Paludis \1/" \ + -e "s/^\([Pp]ortage version: (.*)\)$/Package-manager: Portage \1/"' f() { set -x - mkdir -p "${output}"/{git,cvs-repo/gentoo-x86/Attic} + mkdir -p "${output}"/{git{,-work},cvs-repo/gentoo-x86/Attic} ln -s "${cvsroot}" "${output}/cvs-repo/CVSROOT" ln -s "${root}/gentoo-x86/$1" "${output}/cvs-repo/gentoo-x86/$1" #ln -s "${root}/gentoo-x86/Attic" "${output}/cvs-repo/gentoo-x86/Attic" ln -s "$(pwd)/config" "${output}/config" - cd "${output}" + # Note- this must be canonical path, else it screws up our $Header rewriting. + cd "$(readlink -f "${output}" )" time cvs2git --options config -vv cd git git init --bare - cat ../cvs2svn-tmp/git-{blob,dump}.dat | git fast-import - rm -rf "${final}" + { "${base}/rewrite-blob-data.py" ../cvs2svn-tmp/git-blob.dat; + cat ../cvs2svn-tmp/git-dump.dat; + } | git fast-import + rm -rf "${final}" git-work cd "$root" mv "$output" "${final}" - git --git-dir "${final}/git" log --pretty=tformat:"%at %H" > "${final}/git-hashes" set +x } [ $# -ne 1 ] && { echo "need an argument..."; exit 1; } +base="$(pwd)" root="$(pwd)/cvs-repo" cvsroot="${root}/CVSROOT" repo="${root}/gentoo-x86" @@ -29,6 +35,6 @@ mkdir -p "$(dirname "${final}")" rm -rf "${output}" mkdir -p "${output}" -echo "processing ${1%,v} ${1}" +echo "processing ${1%,v}" >&2 time f "$1" &> "${output}/"log || { echo "failed $1"; exit 1; } -echo "processed $1" +echo "processed $1" >&2 |