1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| get_etcd() { local option=$1 local target_dir=$2 local source_path_or_url=$3 local http_user=$4 local http_passwd=$5
case "$option" in "local") get_etcd_from_local "$source_path_or_url" "$target_dir" ;; "remote") get_etcd_from_remote "$target_dir" "$source_path_or_url" "$http_user" "$http_passwd" ;; *) echo "Invalid option: $option. Please choose 'local' or 'remote'." exit 1 ;; esac }
|