[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
verifymsg script problem
From: |
Roni Abusch |
Subject: |
verifymsg script problem |
Date: |
Thu, 18 Oct 2001 14:01:19 +0200 |
I've tried to use the sample script that can be found in the manual, and
like I was advised by Jerry (thanks!) I did as followed:
1) Checked out CVSROOT
cvs co CVSROOT
2) added a directory for the script and template
cd CVSROOT
mkdir cvsscripts
cvs add cvsscripts
3) added my script and template
cd cvsscripts
cp ...somewhere.../bugid.verify ...somewhere.../bugid.template .
cvs add bugid.*
cvs ci -m "new bugid stuff" bugid.*
cd ..
4) added these files to the checkoutlist
echo cvsscripts/bugid.verify >> checkoutlist
echo cvsscripts/bugid.template >> checkoutlist
cvs ci -m "new bugid stuff" checkoutlist
5) added the required lines to verifymsg and rcsinfo
echo '^Test $(CVSROOT)/CVSROOT/cvsscripts/bugid.verify' >> verifymsg
echo '^Test $(CVSROOT)/CVSROOT/cvsscripts/bugid.template' >> rcsinfo
cvs ci -m "new bugid stuff" verifymsg rcsinfo
My script file (bugid.verify) was copied from the manual, and looked like
this:
#!/bin/sh
#
# bugid.verify filename
#
# Call $EDITOR on FILENAME, and verify that the
# resulting file contains a valid bugid on the first
# line.
if [ "x$EDITOR" = "x" ]; then EDITOR=vi; fi
if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
$CVSEDITOR $1
until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1
do echo -n "No BugId found. Edit again? ([y]/n)"
read ans
case ${ans} in
n*) exit 1;;
esac
$CVSEDITOR $1
done
and when I used it it gave me the following error:
cvs commit: cannot exec /home/cvsroot/CVSROOT/cvsscripts/bugid.verify: No
such file or directory
cvs [commit aborted]: Message verification failed
I removed the comment lines from the beginning and used this script:
if [ "x$EDITOR" = "x" ]; then EDITOR=emacs; fi
if [ "x$CVSEDITOR" = "x" ]; then CVSEDITOR=$EDITOR; fi
$CVSEDITOR $1
until head -1|grep '^BugId:[ ]*[0-9][0-9]*$' < $1
do echo -n "No BugId found. Edit again? ([y]/n)"
read ans
case ${ans} in
n*) exit 1;;
esac
$CVSEDITOR $1
done
and now I'm getting this error:
'home/cvsroot/CVSROOT/cvsscripts/commentcheck.edit: line 7: syntax error
near unexpected token `in
'home/cvsroot/CVSROOT/cvsscripts/commentcheck.edit: line 7: ` case ${ans}
in
cvs [commit aborted]: Message verification failed
Does anyone can help me with that? I'm really stuck here.
Thanks,
Roni.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- verifymsg script problem,
Roni Abusch <=