This Bash script automates the setup of a CodeIgniter project. It modifies the default download from the CodeIgniter website such that the application and system folders are outside of the website root folder. It also (optionally) sets up GetSparks, a Git repository, Git Flow, and does the first remote Git push. Read more about all of the executed operations in the Processes section below.
- cURL
- Git
- Git Flow
- Create the specified directory based on the project name provided
- Get the latest version of CodeIgniter from the website
- Extract Zip
- Remove all index.html and .htaccess files (not needed since system files are outside of webroot)
- Create asset folders in webroot below a dash folder
- Create placeholder style.css and core.js files
- Move license.txt and index.php into webroot
- Chmod cache and log folders to 755
- Remove the welcome controller and view
- Install Sparks
- Move basic .gitignore into place and create initial Git commit
- Check for a valid remote Git repository and push to origin
- Install Git Flow with default settings
- Provide text instructions to complete setup
- Edit setupci.cfg so that it points to the root of your remote Git server. For example,
git@github.com:bold - Review the files within the 'templates' folder. We've set them up how we like them, but that may not be best for you.
- Make sure that the Bash script is in your environment PATH
// create a CI project in the new_project folder with default settings
$ setupci new_project
// create a CI project in the new_project folder without sparks
$ setupci new_project --no-sparks
// create a CI project in the new_project folder without Git
$ setupci new_project --sparks --no-git
// create a CI project in the new_project folder without a remote Git
$ setupci new_project --sparks --git --no-gitremote
// create a CI project in the new_project folder without Git Flow
$ setupci new_project --sparks --git --gitremote --no-gitflow
- Better handling of command line options. Right now they have to be in the specified order.
- Add a --quiet option to limit output