echo 'Runs curl with the cookies from `ia`'"'s"' config file' >&2
echo "MODE must be either cookie or header; in the latter case, the 'Authorization' header is added to *all* requests!" >&2
exit 1
fi
mode="$1"
shift
# Logic for the config file location is the same as upstream: the first one of $IA_CONFIG_FILE, ${XDG_CONFIG_HOME}/internetarchive/ia.ini, ~/.config/ia.ini, ~/.ia that exists is used.