Parcourir la source

kamctl: include .base lib before sercmd detection

- merr() function is declared there
Daniel-Constantin Mierla il y a 15 ans
Parent
commit
f89005faf1
1 fichiers modifiés avec 10 ajouts et 10 suppressions
  1. 10 10
      utils/kamctl/kamctl

+ 10 - 10
utils/kamctl/kamctl

@@ -50,6 +50,16 @@ if [ -z "$MYLIBDIR" ] ; then
 	fi
 fi
 
+##### ------------------------------------------------ #####
+### load base functions
+#
+if [ -f "$MYLIBDIR/kamctl.base" ]; then
+	. "$MYLIBDIR/kamctl.base"
+else
+	echo -e "Cannot load core functions '$MYLIBDIR/kamctl.base' - exiting ...\n"
+	exit -1
+fi
+
 # locate sercmd
 if [ -z "$SERCMD" ] ; then
 	# try same dir as kamctl
@@ -77,16 +87,6 @@ else
 	fi
 fi
 
-##### ------------------------------------------------ #####
-### load base functions
-#
-if [ -f "$MYLIBDIR/kamctl.base" ]; then
-	. "$MYLIBDIR/kamctl.base"
-else
-	echo -e "Cannot load core functions '$MYLIBDIR/kamctl.base' - exiting ...\n"
-	exit -1
-fi
-
 #
 ##### ------------------------------------------------ #####
 ### DBENGINE