1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#! /bin/bash usage() { echo "usage $0 -n <installer_type> -i <installer_ip>" } while getopts ":n:i:" optchar; do case "${optchar}" in n) export INSTALLER_TYPE=${OPTARG};; i) export INSTALLER_IP=${OPTARG};; *) echo "Incorrect usage" usage ;; esac done ./data/fetch_os_creds.sh -d ./opnfv-creds.sh