Skip to content

Commit

Permalink
Merge pull request #259 from recurly/adding_scripts_folder
Browse files Browse the repository at this point in the history
Added `scripts` folder
  • Loading branch information
Aaron Suarez committed Aug 24, 2018
2 parents 9cf496f + fb6943d commit 630c8a0
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/check-deps
Original file line number Diff line number Diff line change
@@ -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"
22 changes: 22 additions & 0 deletions scripts/install-deps
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions scripts/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
set -e

RECURLY_INSECURE_DEBUG=true python3 -m unittest discover -s tests

0 comments on commit 630c8a0

Please sign in to comment.