info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regarding cvscommit file.


From: Steven W. Orr
Subject: Re: Regarding cvscommit file.
Date: Wed, 5 Oct 2005 15:00:14 -0400 (EDT)

On Thursday, Oct 6th 2005 at 00:11 +0530, quoth Maninder Singh(SDG):

=>      I'm trying to restrict the check-in of files into CVS based on
=>the length of the filename using commitinfo file; but to no success. 
=>I'm stuck with how to go about calling the script (written in perl) from
=>the commitinfo file? 
=>Any ideas? Thanks for your help in advance.

In your commitinfo file, just say

ALL     /path/to/script/check_fnlen


NOT TESTED
#! /bin/bash
typeset -ir MAXALLOWEDLEN=32
typeset -r fn=${1##*/}
(( ${#fn} < $MAXALLOWEDLEN ))
exit

-- 
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steve_orr at guardium dot com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]