Last active
August 29, 2015 14:06
-
-
Save Raphhh/d45795a6121d0e875619 to your computer and use it in GitHub Desktop.
PHP Lib Bootstrap script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
working_directory='./' | |
bootstrap_name='raphhh/php-lib-bootstrap' | |
bootstrap_version='@stable' | |
echo 'PHP Lib Bootstrap Generator' | |
echo ''; | |
echo 'Enter your project name (<vendor>/<name>):' | |
read project_name | |
echo ''; | |
echo 'Process to installation' | |
composer self-update | |
composer create-project $bootstrap_name $working_directory$project_name $bootstrap_version | |
echo ''; | |
echo 'Test installation' | |
cd $project_name | |
./vendor/bin/phpunit | |
echo ''; | |
echo 'Enter your GitHub user:' | |
read github_user | |
echo ''; | |
echo 'Enter your GitHub repository to create:' | |
read github_repository | |
echo ''; | |
echo "Creation of $github_user/$github_repository"; | |
curl -u $github_user https://api.github.com/user/repos -d "{\"name\":\"$github_repository\"}" | |
git init | |
git remote add origin https://github.com/$github_user/$github_repository.git | |
git remote -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment