Skip to content
Snippets Groups Projects
Commit dca7d10c authored by Bob Mottram's avatar Bob Mottram
Browse files

Tidying

parent 1ae076f8
No related branches found
No related tags found
No related merge requests found
......@@ -110,11 +110,11 @@ function any_key {
function get_app_icann_address {
app_name="$1"
icann_address=""
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
echo "$icann_address"
echo "${DEFAULT_DOMAIN_NAME}"
}
function passwords_select_user {
......@@ -347,9 +347,6 @@ function show_domains {
continue
fi
icann_address=${DEFAULT_DOMAIN_NAME}
onion_address="-"
# handle the foibles of capitalisation
if ! grep -q "${app_name} domain" $COMPLETION_FILE; then
app_name_upper=$(echo ${app_name} | awk '{print toupper($0)}')
......@@ -366,6 +363,9 @@ function show_domains {
if [ ${#app_name} -gt 0 ]; then
icann_address=$(get_app_icann_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 "${icann_address}")"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment