On 2009-07-26, Jim Hyslop <[email protected]> wrote ...
> [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.
OK, that bit's somewhat less clear, but I'm working on it.
Now that I'm becoming a tiny bit more familiar with CVS, and being a lazy
sod, I've done a small script to relieve me of the tedium of always
remembering the switches to cvs. But the syntax of the following is
proving problematic. Could you tell me where I'm going wrong?
-------------------------------------
#!/bin/sh
(...)
if [ $method = "i" ]; then
/usr/bin/cvs import -m $message $stuff $me $stuff
exit 0
fi
-------------------------------------
The confusing bit is <vendortag'. Can't I just have that as $me (which is
defined as $USER earlier in the thread)?