Skip to content

Commit

Permalink
Added scripts folder
Browse files Browse the repository at this point in the history
Added `scripts` folder for a standard interface to perform common tasks
  • Loading branch information
bhelx committed Aug 24, 2018
1 parent e2ab480 commit fb6943d
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 fb6943d

Please sign in to comment.