The code is in the function called while. The code checks to see if the user entered anything after the --. If they did, it checks to see what command they entered. Once it knows what command to run, it uses the command to get the needed information. It uses the case command to switch between different commands. For example, if they entered --fingerprint, then it would use the shift command to change the case tofingerprint. After that, it checks to see if the Fingerprint option was chosen. If it was, it uses the CA_FINGERPRINT variable to get the fingerprint. If it wasn't, it goes to the next command.
Shortcut: get_opts2
while [ $# -gt 0 ]; do
case "$1" in
--ca-url)
CA_URL="$2"
shift
shift
;;
--fingerprint)
CA_FINGERPRINT="$2"
shift
shift
;;
--provisioner-name)
CA_PROVISIONER_NAME="$2"
shift
shift
;;
--provisioner-password-file)
CA_PROVISIONER_JWK_PASSWORD_FILE="$2"
shift
shift
;;
--dns-names)
RA_DNS_NAMES="$2"
shift
shift
;;
--listen-address)
RA_ADDRESS="$2"
shift
shift
;;
*)
shift
;;
esac
done