diff options
author | joe <joe@FreeBSD.org> | 2001-10-30 18:45:56 +0800 |
---|---|---|
committer | joe <joe@FreeBSD.org> | 2001-10-30 18:45:56 +0800 |
commit | efb53e289a8a0807521c83e03fa616c754936a06 (patch) | |
tree | 630fcda87a64bf4eb7f6cb32c71fd06632cb3a12 /CVSROOT/commitcheck | |
parent | 53033dbcb9ebd421900e43f2ff7543e93961c9fb (diff) | |
download | freebsd-ports-gnome-efb53e289a8a0807521c83e03fa616c754936a06.tar.gz freebsd-ports-gnome-efb53e289a8a0807521c83e03fa616c754936a06.tar.zst freebsd-ports-gnome-efb53e289a8a0807521c83e03fa616c754936a06.zip |
Add the hosts that we're allowed to commit on to the configuration
file instead of hard coding them.
Diffstat (limited to 'CVSROOT/commitcheck')
-rwxr-xr-x | CVSROOT/commitcheck | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CVSROOT/commitcheck b/CVSROOT/commitcheck index aa7edbdbf06a..412bf1567cfa 100755 --- a/CVSROOT/commitcheck +++ b/CVSROOT/commitcheck @@ -10,6 +10,9 @@ # use strict; +use lib $ENV{CVSROOT}; +use CVSROOT::cfg; + my $CVSROOT = $ENV{CVSROOT} || die "Can't determine CVSROOT (commitcheck)!\n"; @@ -17,10 +20,13 @@ my $MINCVSVERSION = "1090900"; # 1.9.9p0 # Check that the user is committing on the right machine. # -use Sys::Hostname; # get hostname() function +use Sys::Hostname; my $hostname = hostname(); -if ($hostname !~ /^freefall.freebsd.org$/) { - print "Please commit on Freefall!\n"; +if (@cfg::COMMIT_HOSTS && !grep(/^\Q$hostname\E$/i, @cfg::COMMIT_HOSTS)) { + print "Please don't commit on this host!\n"; + print "Please commit on ", + join(" or ", @cfg::COMMIT_HOSTS), + " instead.\n"; exit 1; } |