| #! /bin/bash |
| |
| # This script is BenjamÃn C. Calderón's brain child (@benjcal). |
| # Written by Bo and a "good enough for now" draft. |
| # |
| # Expected changes will update the makefile and the boiler plate code. |
| |
| if [ -z $1 ] |
| then |
| echo "Please provide file name." |
| exit 0 |
| fi |
| |
| if [ -a $1 ]; then echo "Couldn't create folder, already exists?"; exit 1; fi |
| if [ -d $1 ]; then echo "Couldn't create folder, already exists?"; exit 1; fi |
| |
| echo "Creating $1" |
| mkdir $1 |
| cd $1 |
| |
| curl -s -LJO https://github.com/boazsegev/facil.io/archive/stable.tar.gz |
| if [ $? -ne 0 ]; then echo "Couldn't download the stable branch from facil.io's GitHub repo."; exit 1; fi |
| |
| tar -xzf facil.io-stable.tar.gz |
| if [ $? -ne 0 ]; then echo "Couldn't extract tar."; exit 1; fi |
| |
| rm facil.io-stable.tar.gz |
| mv ./facil.io-stable/* ./ |
| rm -R facil.io-stable |
| rm -R dev |
| rm -R docs |
| rm -R tests |
| rm CHANGELOG.md |
| rm README.md |
| rm CONTRIBUTING.md |
| rm Doxyfile |
| rm CMakeLists.txt |
| rm LICENSE |
| rm NOTICE |
| make clean &> /dev/null |
| mv ./examples/boiler_plates/http/* ./ |
| rm -R ./examples/boiler_plates |
| make clean &> /dev/null |