diff --git a/scripts/check-deps b/scripts/check-deps new file mode 100755 index 00000000..416a1f31 --- /dev/null +++ b/scripts/check-deps @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -e + +function check_for_command { + if ! hash eval "$1" 2>/dev/null; then + echo "✖ Could not find '$1'" + exit 1 + fi + echo "✓ Found $1" +} + +check_for_command "python3" +check_for_command "pip3" diff --git a/scripts/install-deps b/scripts/install-deps new file mode 100755 index 00000000..7ef57790 --- /dev/null +++ b/scripts/install-deps @@ -0,0 +1,22 @@ +#!/usr/bin/env bash +set -e + +if ! hash brew 2>/dev/null; then + echo "✖ Homebrew not found. Please install: https://brew.sh/" + exit 1 +else + echo "✓ Found homebrew" +fi + +if ! hash python3 2>/dev/null; then + read -p "✖ 'python3' not found. Would you like to install it? [Y/n] " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy\n]$ ]] + then + brew install python3 && true + else + exit 1 + fi +else + echo "✓ Found python3" +fi diff --git a/scripts/test b/scripts/test new file mode 100755 index 00000000..9b87b4b1 --- /dev/null +++ b/scripts/test @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -e + + RECURLY_INSECURE_DEBUG=true python3 -m unittest discover -s tests