diff options
author | Will Andrews <will@FreeBSD.org> | 2000-12-30 02:20:13 +0000 |
---|---|---|
committer | Will Andrews <will@FreeBSD.org> | 2000-12-30 02:20:13 +0000 |
commit | 51dc79714d62c98c930b06e5904c95d414eba891 (patch) | |
tree | 447c26a8ea560df62011c1ea924e77e69c0f5185 /Tools | |
parent | 8552800cb9176680d70f2b9dcbbc62ce0b4674d8 (diff) | |
download | ports-51dc79714d62c98c930b06e5904c95d414eba891.tar.gz ports-51dc79714d62c98c930b06e5904c95d414eba891.zip |
Notes
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/scripts/addport | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/Tools/scripts/addport b/Tools/scripts/addport index 101f6e952e62..711acbcbf0cb 100755 --- a/Tools/scripts/addport +++ b/Tools/scripts/addport @@ -44,8 +44,9 @@ use strict; my %opts; -getopts('ad:fgh:imns:tu:', \%opts); +getopts('ac:d:fgh:imns:tu:', \%opts); +my $c = $opts{'c'} if ($opts{'c'} ne ""); my $nomodules = $opts{'g'}; my $distdir = $opts{'s'} if ($opts{'s'} ne ""); my $dir = $opts{'d'}; @@ -86,6 +87,24 @@ if ($myhost ne lc($h)) { $repo = "$ENV{CVSROOT}" if $ENV{CVSROOT}; my $cvs = "cvs -d $repo"; +# Do commitfile checking. +my $commitfile = ""; +# first check for relative paths then skip absolute, then add it to filenames. +if ($c =~ m,.*/,) { + $c = "$currentdir/$c"; +} elsif ($c =~ m,/,) { + # do nothing +} else { + # assume user passed something like "file" + $c = "$currentdir/$c"; +} +if (-f $c) { + $commitfile = "EDITOR=\"cp $c\""; + print "\nRemember, you asked to use a commit file to read for the commit log.\n"; + print "This means you'll get a message saying the log message was unchanged or\n"; + print "not specified. Just tell it to continue and it will be committed.\n\n"; +} + # stuff that always happens when we start BEGIN { $tmpdir=`mktemp -d -t ap`; @@ -235,7 +254,7 @@ foreach my $thisdir (@dirs) { # commit the actual port. chdir "$tmpdir/$category" or err(1, "$tmpdir/$category"); - system("$cvs $n ci Makefile $portname") && errx(1, "cvs commit failed, aborting."); + system("$commitfile $cvs $n ci Makefile $portname") && errx(1, "cvs commit failed, aborting."); if (!$nomodules) { system("$ssh $perl /usr/local/bin/modulesupdate $module ports/$category/$portname") && errx(1, "adding port to modules failed, aborting."); } @@ -290,7 +309,7 @@ print <<EOF; authors: <will\@FreeBSD.org>, <mharo\@FreeBSD.org> SYNOPSIS - $0 [-h host] [-u user] [-s distdir] [-afimnt] -d directory + $0 [-h host] [-u user] [-s distdir] [-acfimnt] -d directory Where "directory" contains the comma-delimited list of root directories of new ports that you wish to @@ -300,6 +319,7 @@ SYNOPSIS OPTIONS -a Perform checks on the port to make sure there are no problems. Recommended. + -c file Use file in place of normal log message. -f Do not fetch the distfile. -h host Use a cvshost besides freefall.FreeBSD.org. -i Interactive mode; allow more control over |