diff --git a/src/gl-admin-push b/src/gl-admin-push index 4031e93..cd71137 100755 --- a/src/gl-admin-push +++ b/src/gl-admin-push @@ -1,6 +1,15 @@ #!/bin/sh die() { echo "$@" >&2; exit 1; } +if [ "$1" = "-h" ] +then + echo Usage: + echo " gl-admin-push [any options applicable to 'git push' command]" + echo + echo "Please see the 'gl-admin-push: ...' section in doc/tips-notes.mkd (Online at" + echo " http://sitaramc.github.com/gitolite/adminpush.html)" + exit 1 +fi # ---------- diff --git a/src/gl-conf-convert b/src/gl-conf-convert index 1faca4f..7b0bfee 100755 --- a/src/gl-conf-convert +++ b/src/gl-conf-convert @@ -9,6 +9,10 @@ use strict; use warnings; +if (not @ARGV and -t or $ARGV[0] eq '-h') { + print "Usage:\n gl-conf-convert < gitosis.conf > gitolite.conf\n(please the documentation for more)\n"; + exit 1; +} my @comments = (); my $groupname; diff --git a/src/gl-dryrun b/src/gl-dryrun index 2ebd198..5943433 100755 --- a/src/gl-dryrun +++ b/src/gl-dryrun @@ -11,7 +11,7 @@ cat <>> } + +sub usage { + print " +Usage: + gl-system-install [bin-dir conf-dir hooks-dir] + +Requires all 3 arguments or none. All arguments supplied must be absolute +paths. The following defaults are used if arguments are not supplied: + + as normal user: \$HOME/bin, \$HOME/share/gitolite/conf, \$HOME/share/gitolite/hooks + as root: /usr/local/bin, /var/gitolite/conf, /var/gitolite/hooks +"; + exit 1; +} + diff --git a/src/gl-tool b/src/gl-tool index 256a47a..d95a3bc 100755 --- a/src/gl-tool +++ b/src/gl-tool @@ -13,7 +13,7 @@ use gitolite_rc; use gitolite; sub usage { print ; exit 1; } -usage() unless (@ARGV); +usage() if (not @ARGV) or $ARGV[0] eq '-h'; my $cmd = shift; my $pub = shift; diff --git a/src/sshkeys-lint b/src/sshkeys-lint index 96c027f..a18a306 100755 --- a/src/sshkeys-lint +++ b/src/sshkeys-lint @@ -8,7 +8,8 @@ use warnings; use Getopt::Long; my $admin = 0; my $quiet = 0; -GetOptions('admin|a=s' => \$admin, 'quiet|q' => \$quiet); +my $help = 0; +GetOptions('admin|a=s' => \$admin, 'quiet|q' => \$quiet, 'help|h' => $help); use Data::Dumper; $Data::Dumper::Deepcopy = 1; @@ -31,7 +32,7 @@ sub msg { print "sshkeys-lint: " . ( $warning ? "WARNING: " : "" ) . $_ for @_; } -@ARGV or not -t or usage(); +usage() if not @ARGV and -t or $help; our @pubkeyfiles = @ARGV; @ARGV = (); # ------------------------------------------------------------------------