summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-05-16 09:28:51 +0000
committerdes <des@FreeBSD.org>2001-05-16 09:28:51 +0000
commit85d83b9db3e6b412147715a5b4ec73788fe60782 (patch)
tree61716ccebfb3e367c97a5736e42b1f9fa0266521 /misc
parentb41d03c865a92d2bf44bd7ec1e449ae5f1e2c119 (diff)
downloadFreeBSD-ports-85d83b9db3e6b412147715a5b4ec73788fe60782.zip
FreeBSD-ports-85d83b9db3e6b412147715a5b4ec73788fe60782.tar.gz
Change the order in which we check out the ports root and index to work
around a CVS bug. Also add some missing options to usage() and help() and alphabetize them properly, and show the usage string if no arguments were specified on the command line.
Diffstat (limited to 'misc')
-rw-r--r--misc/porteasy/Makefile2
-rw-r--r--misc/porteasy/src/porteasy.pl29
2 files changed, 20 insertions, 11 deletions
diff --git a/misc/porteasy/Makefile b/misc/porteasy/Makefile
index 5f30ab7..811b167 100644
--- a/misc/porteasy/Makefile
+++ b/misc/porteasy/Makefile
@@ -9,7 +9,7 @@
PORTNAME= porteasy
PORTVERSION= 2.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= misc
MASTER_SITES= # none
DISTFILES= # none
diff --git a/misc/porteasy/src/porteasy.pl b/misc/porteasy/src/porteasy.pl
index fa7c1e7..b9ced56 100644
--- a/misc/porteasy/src/porteasy.pl
+++ b/misc/porteasy/src/porteasy.pl
@@ -300,15 +300,17 @@ sub update_index() {
$parent = $portsdir;
$parent =~ s/\/*ports\/*$//;
- cd($parent);
- if (-f "ports/INDEX" || (-d "ports" && -d "ports/CVS")) {
- cvs("update", "ports/INDEX")
- or bsd::errx(1, "error updating the index file");
- } else {
+ if (! -f "ports/INDEX" || ! -d "ports/CVS") {
+ cd($parent);
cvs("checkout", "-l", "ports")
or bsd::errx(1, "error checking out the index file");
+ cd($portsdir);
+ } else {
+ cd($portsdir);
+ cvs("update", "Makefile", "INDEX")
+ or bsd::errx(1, "error updating the index file");
}
- cvs("update", "-l", "ports/Mk")
+ cvs("update", "Mk")
or bsd::errx(1, "error updating the Makefiles");
}
@@ -803,7 +805,7 @@ sub build_port($) {
#
sub usage() {
- stderr("Usage: porteasy [-abCceFfhikluVv] [-d dir] [-D date]\n" .
+ stderr("Usage: porteasy [-abCceFfhikLluVvw] [-D date] [-d dir]\n" .
" [-p dir] [-r dir] [-t tag] [port ...]\n");
exit(1);
}
@@ -830,18 +832,20 @@ $COPYRIGHT
Options:
-a, --anoncvs Use the FreeBSD project's anoncvs server
-b, --build Build required ports
- -c, --clean Clean the specified ports
-C, --dontclean Don't clean after build
+ -c, --clean Clean the specified ports
-e, --exclude-installed Exclude installed ports
+ -F, --force-pkg-register Force package registration
-f, --fetch Fetch distfiles
-h, --help Show this information
-i, --info Show info about specified ports
-k, --packages Build packages for the specified ports
- -L, --plist Show the packing lists for the specified ports
+ -L, --plist Show the packing lists for the specified ports
-l, --list List required ports and their dependencies
-u, --update Update relevant portions of the ports tree
- -V, --version Show version number
+ -V, --version Show version number
-v, --verbose Verbose mode
+ -w, --website Show the URL to the port's website
Parameters:
-D, --date=DATE Specify CVS date
@@ -860,6 +864,11 @@ MAIN:{
my $err = 0; # Error count
my $need_index; # Need the index
+ # Show usage if no arguments were specified on the command line
+ if (!@ARGV) {
+ usage();
+ }
+
# Get option defaults
if ($ENV{'PORTEASY_OPTIONS'}) {
foreach (split(' ', $ENV{'PORTEASY_OPTIONS'})) {
OpenPOWER on IntegriCloud