2021-04-19 14:01:33 +03:00
|
|
|
#!/bin/bash
|
2022-11-21 10:25:35 +03:00
|
|
|
#FILE=${HOME}/.config/composer/auth.json
|
|
|
|
#
|
|
|
|
#if [[ -f "${FILE}" ]]; then
|
|
|
|
# if [[ ! -z "$(cat $FILE | grep github)" ]]; then
|
|
|
|
# exit 0
|
|
|
|
# fi
|
|
|
|
#fi
|
2021-04-19 14:01:33 +03:00
|
|
|
|
|
|
|
echo "Get token: https://github.com/settings/tokens/new?scopes=repo&description=Composer"
|
|
|
|
|
|
|
|
# user="USER INPUT"
|
|
|
|
read -p "Enter token: " TOKEN
|
|
|
|
|
2022-11-21 10:25:35 +03:00
|
|
|
composer config -g github-oauth.github.com ${TOKEN}
|