Browse Source

update _help

pull/16/head
gorgone 5 years ago
parent
commit
c78f135df4
  1. 125
      support/functions/_help

125
support/functions/_help

@ -1,61 +1,86 @@
#!/bin/bash
_help_toolchain(){
echo -e "$w_l toolchains :\n ------------$g_n";
helpline1 "${AVAI_TCLIST[@]}";
echo -e "\n";
};
printf "$w_l toolchains :\n ------------$g_n\n"
helpline1 "${AVAI_TCLIST[@]}"
printf "\n"
}
helpline0(){
ll=0;
echo -en " ";
for s in "$@";do
ll=0
printf " ";
for s in "$@"
do
if [ ! "$s" == "USE_SSL" ] \
&& [ ! "$s" == "USE_MCA" ] \
&& [ ! "$s" == "USE_LIBUSB" ] \
&& [ ! "$s" == "USE_CONFDIR" ];
&& [ ! "$s" == "USE_CONFDIR" ]
then
ll=$((ll + (${#s} + 4)));
if [ "$ll" -lt "30" ];then
echo -en "$s(_off) ";
ll=$((ll + (${#s} + 4)))
if [ "$ll" -lt "30" ]
then
printf "$s(_off) "
else
echo -en "$s(_off)\n ";
ll="";
fi;
fi;
done;
};
printf "$s(_off)\n "
ll=""
fi
fi
done
}
helpline1(){
ll=0;
echo -en " ";
for s in "$@";do
ll=$((ll + (${#s} + 4)));
if [ "$ll" -lt "45" ];then
echo -en "$s " ;
ll=0
printf " "
for s in "$@"
do
ll=$((ll + (${#s} + 4)))
if [ "$ll" -lt "45" ]
then
printf "$s "
else
echo -en "$s\n " ;
ll="";
fi;
done;
};
_help(){ clear;s3logo;
echo -e " --------------------------------------";
echo -e " $txt_help1 $0 menu";
echo -e " $txt_help2";
echo -e " --------------------------------------";
echo -e "$w_l\n toolchains :\n ------------$g_n";
helpline1 "${AVAI_TCLIST[@]}";
echo -e "$w_l\n simplebuild options :\n ---------------------$c_n";
helpline1 "${s3opts[@]}";_wait;
echo -e "$w_l config_cases:\n --------$c_n";
helpline0 "${config_cases[@]}";
echo -e "$w_l\n\n addons :\n --------$p_l";
helpline0 "${SHORT_ADDONS[@]}";_wait;
echo -e "$w_l protocols :\n -----------$y_l";
helpline0 "${SHORT_PROTOCOLS[@]}";
echo -e "$w_l\n readers :\n ---------$r_l";
helpline0 "${SHORT_READERS[@]}";_wait;
echo -e "$w_l card_readers :\n --------------$b_l";
helpline0 "${SHORT_CARD_READERS[@]}";
echo -e "$w_l\n use_vars :\n --------$w_n";
helpline0 "${!USE_vars[@]}";_wait;
};
printf "$s\n "
ll=""
fi
done
}
_help(){
clear
s3logo
printf " --------------------------------------\n"
printf " $txt_help1 $0 menu\n"
printf " $txt_help2\n"
printf " --------------------------------------\n"
printf "$w_l\n toolchains :\n ------------$g_n\n"
helpline1 "${AVAI_TCLIST[@]}\n"
printf "$w_l\n simplebuild options :\n ---------------------$c_n\n"
helpline1 "${s3opts[@]}"
_wait
printf "\r$w_l config_cases:\n -------------$c_n\n"
helpline0 "${config_cases[@]}"
printf "$w_l\n\n addons :\n --------$p_l\n"
helpline0 "${SHORT_ADDONS[@]}"
_wait
printf "\n$w_l protocols :\n -----------$y_l\n"
helpline0 "${SHORT_PROTOCOLS[@]}"
printf "$w_l\n readers :\n ---------$r_l\n"
helpline0 "${SHORT_READERS[@]}"
_wait
printf "\n$w_l card_readers :\n --------------$b_l\n"
helpline0 "${SHORT_CARD_READERS[@]}"
printf "$w_l\n use_vars :\n --------$w_n\n"
helpline0 "${!USE_vars[@]}"
_wait
_nl
}

Loading…
Cancel
Save