diff --git a/selenium/automate_chrome.sh b/selenium/automate_chrome.sh index d540b61d9..ce4078221 100755 --- a/selenium/automate_chrome.sh +++ b/selenium/automate_chrome.sh @@ -1,5 +1,25 @@ #!/bin/bash + set -e + +require_command(){ + cmd_name=$1 + if [ -z $(command -v $1) ]; then + echo "$1 command required for this script to run" + exit 1 + fi +} + +require_command "awk" +require_command "cut" +require_command "docker" +require_command "ifconfig" +require_command "sed" +require_command "true" +require_command "unzip" +require_command "uuidgen" +require_command "wget" + input=$1 driver_version=$2 tag=$3 diff --git a/selenium/automate_firefox.sh b/selenium/automate_firefox.sh index a32b9a4cd..81e386016 100755 --- a/selenium/automate_firefox.sh +++ b/selenium/automate_firefox.sh @@ -1,5 +1,25 @@ #!/bin/bash set -e + +require_command(){ + cmd_name=$1 + if [ -z $(command -v $1) ]; then + echo "$1 command required for this script to run" + exit 1 + fi +} + +require_command "awk" +require_command "cut" +require_command "docker" +require_command "ifconfig" +require_command "jq" +require_command "sed" +require_command "tar" +require_command "true" +require_command "uuidgen" +require_command "wget" + input=$1 server_version=$2 tag=$3 diff --git a/selenium/automate_opera.sh b/selenium/automate_opera.sh index 1acfc579f..00a906ebc 100755 --- a/selenium/automate_opera.sh +++ b/selenium/automate_opera.sh @@ -1,5 +1,25 @@ #!/bin/bash set -e + +require_command(){ + cmd_name=$1 + if [ -z $(command -v $1) ]; then + echo "$1 command required for this script to run" + exit 1 + fi +} + +require_command "awk" +require_command "cut" +require_command "docker" +require_command "ifconfig" +require_command "jq" +require_command "sed" +require_command "true" +require_command "unzip" +require_command "uuidgen" +require_command "wget" + input=$1 driver_version=$2 tag=$3 diff --git a/selenium/automate_yandex.sh b/selenium/automate_yandex.sh index a1510436d..a8389c02d 100755 --- a/selenium/automate_yandex.sh +++ b/selenium/automate_yandex.sh @@ -1,5 +1,25 @@ #!/bin/bash set -e + +require_command(){ + cmd_name=$1 + if [ -z $(command -v $1) ]; then + echo "$1 command required for this script to run" + exit 1 + fi +} + +require_command "awk" +require_command "cut" +require_command "docker" +require_command "ifconfig" +require_command "jq" +require_command "sed" +require_command "true" +require_command "unzip" +require_command "uuidgen" +require_command "wget" + input=$1 driver_version=$2 tag=$3