This commit is contained in:
Bob Mottram 2016-11-21 10:36:09 +00:00
parent 1ae076f81b
commit dca7d10cad
1 changed files with 6 additions and 6 deletions

View File

@ -110,11 +110,11 @@ function any_key {
function get_app_icann_address { function get_app_icann_address {
app_name="$1" app_name="$1"
icann_address=""
if grep -q "${app_name} domain" $COMPLETION_FILE; then if grep -q "${app_name} domain" $COMPLETION_FILE; then
icann_address=$(cat ${COMPLETION_FILE} | grep "${app_name} domain" | head -n 1 | awk -F ':' '{print $2}') echo $(cat ${COMPLETION_FILE} | grep "${app_name} domain" | head -n 1 | awk -F ':' '{print $2}')
return
fi fi
echo "$icann_address" echo "${DEFAULT_DOMAIN_NAME}"
} }
function passwords_select_user { function passwords_select_user {
@ -347,9 +347,6 @@ function show_domains {
continue continue
fi fi
icann_address=${DEFAULT_DOMAIN_NAME}
onion_address="-"
# handle the foibles of capitalisation # handle the foibles of capitalisation
if ! grep -q "${app_name} domain" $COMPLETION_FILE; then if ! grep -q "${app_name} domain" $COMPLETION_FILE; then
app_name_upper=$(echo ${app_name} | awk '{print toupper($0)}') app_name_upper=$(echo ${app_name} | awk '{print toupper($0)}')
@ -366,6 +363,9 @@ function show_domains {
if [ ${#app_name} -gt 0 ]; then if [ ${#app_name} -gt 0 ]; then
icann_address=$(get_app_icann_address "$app_name") icann_address=$(get_app_icann_address "$app_name")
onion_address=$(get_app_onion_address "$app_name") onion_address=$(get_app_onion_address "$app_name")
if [ ${#onion_address} -eq 0 ]; then
onion_address="-"
fi
echo -n -e "$(pad_string "${app_name}")" echo -n -e "$(pad_string "${app_name}")"
echo -n -e "$(pad_string "${icann_address}")" echo -n -e "$(pad_string "${icann_address}")"