aboutsummaryrefslogtreecommitdiff
path: root/bin/ak
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak')
-rwxr-xr-xbin/ak54
1 files changed, 47 insertions, 7 deletions
diff --git a/bin/ak b/bin/ak
index 5724ce2..0861d3b 100755
--- a/bin/ak
+++ b/bin/ak
@@ -17,7 +17,8 @@
### You should have received a copy of the GNU General Public License
### along with this program. If not, see <http://www.gnu.org/licenses/>.
###
-export AK_DEBUG="yes"
+export AK_DEBUG=0
+export AK_DEBUG_IRC="no"
##
## Arching Kaos CLI tool is the main executable script to use for exploring,
## creating and distributing local blockchain(s) called zchain(s).
@@ -28,14 +29,16 @@ export AK_DEBUG="yes"
##
## Run with no arguments to see available commands
##
-## -h, --help Prints this help message
+## -h, --help Prints this help message.
##
-## -s, --shell Starts an interactive shell
+## -s, --shell Starts an interactive shell.
##
## -m, --module [module] Run a specified module. If no module provided
## the list of available modules will be printed.
##
-## -f, --function [function] Get the list of available functions
+## -f, --function [function] Get the list of available functions.
+##
+## -v Print all log messages.
##
## [command] [args] Run a command. If none provided a list of
## commands will be printed.
@@ -49,6 +52,43 @@ source $AK_LIBDIR/_ak_lib_load
_ak_lib_load _ak_log
_ak_lib_load _ak_script
+if [ "$1" == "-vi" ]
+then
+ export AK_DEBUG_IRC="yes"
+ export AK_DEBUG="no"
+ shift
+fi
+if [ "$1" == "-vn" ]
+then
+ export AK_DEBUG="no"
+ shift
+fi
+if [ "$1" == "-vvvvv" ]
+then
+ export AK_DEBUG=5
+ shift
+fi
+if [ "$1" == "-vvvv" ]
+then
+ export AK_DEBUG=4
+ shift
+fi
+if [ "$1" == "-vvv" ]
+then
+ export AK_DEBUG=3
+ shift
+fi
+if [ "$1" == "-vv" ]
+then
+ export AK_DEBUG=2
+ shift
+fi
+if [ "$1" == "-v" ]
+then
+ export AK_DEBUG=1
+ shift
+fi
+
if [ $# -eq 0 ]
then
_ak_log_warning "No command given"
@@ -61,11 +101,11 @@ then
args="-h"
if [ -n "$subcmd" ]
then
- echo $subcmd | cut -d '-' -f 2 | sort | uniq | sed -e 's/^/ak /g'
+ echo $subcmd | cut -d '-' -f 2 | sort | uniq #| sed -e 's/^/ak /g'
#$(echo $subcmd) $args
fi
done
- ) | sort | uniq | sed 's/^/# /g' | while read line; do _ak_log_info "$line";done
+ ) | sort | uniq #| sed 's/^/# /g' | while read line; do _ak_log_info "$line";done
exit 1
fi
@@ -179,7 +219,7 @@ else
fi
counter=$(($counter + 1))
done
- _ak_usage
+ # _ak_usage err
find $AK_BINDIR | while read available
do
echo $(basename $available) |\