#!/bin/bash

if [[ "$1" == "-d" ]]; then
  curl -s ipinfo.io | jq
else
  curl ipinfo.io/ip && echo
fi

