summaryrefslogtreecommitdiff
path: root/ports-mgmt/porteasy
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2001-05-16 09:28:51 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2001-05-16 09:28:51 +0000
commit5f1da281bf3ce0213bc53d52d95f13dd24411fad (patch)
tree1950cc58da4db510fa31e6b4c2c066037a6e0161 /ports-mgmt/porteasy
parentUpgrade to version 0.17. (diff)
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.
Notes
Notes: svn path=/head/; revision=42632
Diffstat (limited to 'ports-mgmt/porteasy')
-rw-r--r--ports-mgmt/porteasy/Makefile2
-rw-r--r--ports-mgmt/porteasy/src/porteasy.pl29
2 files changed, 20 insertions, 11 deletions
diff --git a/ports-mgmt/porteasy/Makefile b/ports-mgmt/porteasy/Makefile
index 5f30ab785df7..811b167a117d 100644
--- a/ports-mgmt/porteasy/Makefile
+++ b/ports-mgmt/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/ports-mgmt/porteasy/src/porteasy.pl b/ports-mgmt/porteasy/src/porteasy.pl
index fa7c1e7fac8b..b9ced56be732 100644
--- a/ports-mgmt/porteasy/src/porteasy.pl
+++ b/ports-mgmt/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'})) {