You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
338 B

  1. #!/bin/bash
  2. FILE=${HOME}/.composer/auth.json
  3. if [[ -f "${FILE}" ]]; then
  4. if [[ ! -z "$(cat $FILE | grep github)" ]]; then
  5. exit 0
  6. fi
  7. fi
  8. echo "Get token: https://github.com/settings/tokens/new?scopes=repo&description=Composer"
  9. # user="USER INPUT"
  10. read -p "Enter token: " TOKEN
  11. composer config -g github-oauth.github.com ${TOKEN}