diff --git a/scp-remote-to-local.sh b/scp-remote-to-local.sh new file mode 100644 index 0000000..11d18d3 --- /dev/null +++ b/scp-remote-to-local.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# +# Dependencies: +# brew install jq +# +# Example: +# /bin/bash ./results.sh +# +# Description: +# Grabs list of running instances for specified BBC Cosmos component (TEST environment) +# SCP's known log locations from remote to new local directory + +# Enable a form of 'strict mode' for Bash +set -euo pipefail +IFS=$'\n\t' + +# Define our expected variables up front +cert=${1:-} +component=${2:-} +user=${3:-} +api="https://api.live.bbc.co.uk/cosmos/env/test/component/$component/instances" + +if [ "$#" -ne 3 ]; then + cat <