[TopGit PATCH] Check for cmddir earlier

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Without cmddir, tg is basically useless, even do_help() needs it, so
check it first and die hard if not found

Signed-off-by: martin f. krafft <madduck@xxxxxxxxxx>
---
 tg.sh |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tg.sh b/tg.sh
index ea22544..f3d1323 100644
--- a/tg.sh
+++ b/tg.sh
@@ -237,6 +237,9 @@ do_help()
 
 ## Startup
 
+[ -d "@cmddir@" ] ||
+	die "No command directory: '@cmddir@'"
+
 args_saved="$@"
 while [ -n "$1" ]; do
 	case "$1" in
@@ -263,9 +266,6 @@ tg="tg"
 setup_ours
 setup_hook "pre-commit"
 
-[ -d "@cmddir@" ] ||
-	die "No command directory: '@cmddir@'"
-
 ## Dispatch
 
 # We were sourced from another script for our utility functions;
-- 
1.6.0.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux