diff options
author | 2012-02-27 19:23:18 +0530 | |
---|---|---|
committer | 2012-02-27 19:23:18 +0530 | |
commit | ee81c52e805961a32665f77ed269d0f2fd211213 (patch) | |
tree | 43b85d610dde617d6581ea4799416d1696f3341c | |
parent | gl-setup changes: (diff) | |
download | gitolite-gentoo-ee81c52e805961a32665f77ed269d0f2fd211213.tar.gz gitolite-gentoo-ee81c52e805961a32665f77ed269d0f2fd211213.tar.bz2 gitolite-gentoo-ee81c52e805961a32665f77ed269d0f2fd211213.zip |
gl-system-install learns '-h'
-rwxr-xr-x | src/gl-system-install | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/gl-system-install b/src/gl-system-install index 834775c..99cf075 100755 --- a/src/gl-system-install +++ b/src/gl-system-install @@ -53,7 +53,7 @@ exit 0; sub check_args { return unless @ARGV; return if @ARGV == 3; - die "I need all 3 directories (bin-dir, conf-dir, hooks-dir) or none\n"; + usage(); } sub argv_or_defaults { @@ -127,3 +127,18 @@ sub path_advice { $path_advice; #>>> } + +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; +} + |