allow script/git-repo to accept a owner/repo in addition to URLs

This commit is contained in:
Ben Balter 2017-12-28 12:03:23 -05:00
parent 0e81259ed4
commit d1c8c12aca
No known key found for this signature in database
GPG Key ID: DBB67C246AD356C4
1 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
#!/bin/sh
# Runs the licensee command against a remote git repo
# Usage: script/git-repo benbalter/licensee
# or script/git-repo https://github.com/benbalter/licensee
set -e
@ -8,6 +10,10 @@ name=$(basename "$repo")
dir="./tmp/$name"
rm -Rf "$dir"
if [[ ! $repo == https://* ]]; then
repo="https://github.com/$repo"
fi
bundle exec bin/licensee "$repo"
if [ "$2" = "--license" ]; then