From e4abcbd1d9d25120678272d693e136fc56882fbe Mon Sep 17 00:00:00 2001 From: Alec Muffett Date: Mon, 27 Feb 2017 11:51:11 +0000 Subject: [PATCH] commit: do -a support for ob-start --- eotk | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/eotk b/eotk index f484280..4c5506a 100755 --- a/eotk +++ b/eotk @@ -438,22 +438,26 @@ case "$cmd" in chmod 700 $ob_dir # otherwise tor complains # sanity check that args are provided - if [ "x$1" = "x" ] ; then + if [ "x$1" = "x" ] ; then # test for no args Print error: missing project name, try: $prog projects for a list, or -a for all exit 1 + elif [ "x$1" = "x-a" ] ; then # test for / expand the "-a" flag + projects=`ListProjects` + else # do what we are told + projects="$*" fi tor_address=127.0.0.1 tor_port=9055 # get the mappings - Print gathering mappings for OnionBalance for projects: "$@" + Print gathering mappings for OnionBalance for projects: $projects mappings=__om$$.tmp - $self maps "$@" | + $self maps $projects | awk '/^::::/ {next;} $2=="softmap"{print;}' >$mappings # check the mappings - for p in "$@" ; do + for p in $projects ; do n=`awk '$1=="'"$p"'"'<$mappings | wc -l` if [ $n = 0 ] ; then Warn no mappings available for project $p, does it exist / is it not a softmap project"?"