-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [email protected] wrote: > May I ask another question? I have a load of shell scripts in $HOME/bin... > nothing fancy, just some shit that I've knocked together over the years to > do various menial crap that I can't be bothered remembering the various > switches to. Now I want to add them to cvs, but what do I do with the > files in $HOME/bin ? They need to stay there, as my $PATH points there. > When an 'import' is done, are the files in $HOME/bin copied to $CVSROOT, a > la 'ln -s'? In short, do I need to do.. > > $ cd $HOME/bin > $ cvs import -m "my shell scripts" me bin * > $ rm -rfv $HOME/bin > $ cvs checkout bin > > ..? > > Wouldn't that recreate the appropriate files in $HOME/bin, and I could > edit, commit and update at will? Do I *need* to delete them at all? > Can't I just .. > > $ cd $HOME/bin > $ cvs import -m "my shell scripts" me bin * > $ cvs checkout bin No, because the checkout command not only retrieves the files from the repository, it creates a CVS subdirectory containing its administrative files. If you tried checking out with the files present, you would get a lot of confusing error messages.
What I often do for scripts like that is to import the scripts, then set up a commit script that will copy the files from the repository into the target directory (in your case, $HOME/bin). I do that because sometimes the modifications and fine-tuning take longer than expected, and I have to switch to other tasks before the modifications are complete. In that case, I don't want to use the half-baked scripts. See the Cederquist section "Keeping a checked out copy" (http://ximbiot.com/cvs/manual/cvs-1.11.23/cvs_18.html#SEC188) for details on how to do that. - -- Jim Hyslop Dreampossible: Better software. Simply. http://www.dreampossible.ca Consulting * Mentoring * Training in C/C++ * OOD * SW Development & Practices * Version Management -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkpsl6sACgkQLdDyDwyJw+N9kgCfZr5AZFf+azmEWZZXsM9NhByD zssAoMKVjaigShKBJFlCUxgCjnXiB9sg =77g7 -----END PGP SIGNATURE-----
