Sha256: 5e88b398780b1d2fe4f1c02dc5d44315862b2a107d9539a7ef1269976d1105e2

Contents?: true

Size: 709 Bytes

Versions: 6

Compression:

Stored size: 709 Bytes

Contents

#!/bin/sh

# this is the action you want to perform. can either be 'add' or 'remove'
ACTION=$1

# email to add or remove
EMAIL=$2

check_jq() {
  command -v jq >/dev/null 2>&1 || { echo "I require jq but it's not installed.  Aborting." >&2; exit 1; }
}

check_params() {
  if [[ ! $ACTION =~ ^(add|remove)$ ]]
  then
    echo "Missing or wrong action"
    echo "Usage: $0 <action to perform (add|remove)> <email address>"
    exit 1
  fi

  if [ "$EMAIL" = "" ]
  then
    echo "Missing email address"
    echo "Usage: $0 <action to perform (add|remove)> <email address>"
    exit 1
  fi
}

check_jq
check_params

for i in $( heroku apps --json | jq '.[] | .name' -r ); do
  heroku access:$1 $2 --app $i
done

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
renuo-cli-1.1.0 lib/renuo/cli/app/heroku_users
renuo-cli-0.2.0 lib/renuo/cli/app/heroku_users
renuo-cli-0.1.2 lib/renuo/cli/app/heroku_users
renuo-cli-0.1.1 lib/renuo/cli/app/heroku_users
renuo-cli-0.0.13 lib/renuo/cli/app/heroku_users
renuo-cli-0.0.12 lib/renuo/cli/app/heroku_users