diff options
author | Ken Dreyer <ktdreyer@ktdreyer.com> | 2012-08-22 19:59:43 -0600 |
---|---|---|
committer | Ken Dreyer <ktdreyer@ktdreyer.com> | 2012-08-22 20:01:13 -0600 |
commit | d11688f29317cba9d27ca53dc3d2d616c269e53b (patch) | |
tree | 9d4d4334d7cddc7ced51417ddcd933fa0a02f1fa | |
parent | 36151d4c048fb8f372ca67287949a8dca8862bb1 (diff) | |
download | rpmfusion-tools-d11688f29317cba9d27ca53dc3d2d616c269e53b.tar.gz rpmfusion-tools-d11688f29317cba9d27ca53dc3d2d616c269e53b.tar.xz rpmfusion-tools-d11688f29317cba9d27ca53dc3d2d616c269e53b.zip |
keep local ".cvsimport" copies up to date
This will allow us to track any changes that happen in CVS by re-running the script.
-rwxr-xr-x | cvstogit | 26 |
1 files changed, 7 insertions, 19 deletions
@@ -49,8 +49,10 @@ BRANCHES=( ['EL-4']='el4' ) -# Import a remote RPM Fusion CVS repo into a local git repo, using -# the git-cvsimport command. +# Import a remote RPM Fusion CVS repo into a local git repo, using the +# git-cvsimport command, and writing into a "$package.cvsimport" directory. If +# the directory already exists, cvsimport will pull in any updates from the +# remote repo into the local Git version. # Arguments: # - RPM Fusion repo (free or nonfree) # - RPM Fusion package (eg ffmpeg or openafs) @@ -66,12 +68,6 @@ git_cvsimport() { fi package=$2 - # Error if we already have downloaded this repo. - if [[ -d $package ]]; then - echo "Error: $package directory already exists." - exit 1 - fi - # Import from CVS into a Git repository. # TODO: use "-A <author-conv-file>" to convert authors' Unix account # names to Git author emails. @@ -79,7 +75,7 @@ git_cvsimport() { git cvsimport -a \ -d :ext:$USERNAME@cvs.rpmfusion.org:/cvs/$repo \ $package \ - -C $package || exit 1 + -C "$package.cvsimport" || exit 1 } @@ -247,17 +243,9 @@ do_repotree() { # Cycle through each package. packages=$(grep -v "^#" owners/owners.list | cut -d \| -f 2) for package in $packages; do + git_cvsimport $repo $package rm -rf $package - # Check for a cached "cvsimport" directory. - if [[ -d "$package.cvsimport" ]]; then - cp -r "$package.cvsimport" $package - else - # Pull the package down over the network, and convert it to git. - git_cvsimport $repo $package - # Save this raw cvsimport directory, so that we can avoid hitting - # the network next time. - cp -r $package "$package.cvsimport" - fi + cp -r "$package.cvsimport" $package # Do the rest of the conversion steps. convert_branches $package merge_branches $package |