Created
February 2, 2014 20:51
-
-
Save sjlu/8774740 to your computer and use it in GitHub Desktop.
A nice script to initialize a CodeIgniter Sunrise project.
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/bash | |
# Must have a project name | |
if [ "$#" -ne 1 ]; then | |
echo "Usage: ./sunrise.sh <project_name>" | |
exit 1 | |
fi | |
if [ -d "$1" ]; then | |
echo "ERROR: Directory already exists." | |
exit 1 | |
fi | |
# Get sunrise | |
wget https://github.com/sjlu/CodeIgniter-Sunrise/archive/master.zip -O sunrise.zip | |
unzip sunrise.zip | |
rm sunrise.zip | |
mv CodeIgniter-Sunrise-master $1 | |
cd $1 | |
# Install deps | |
./build.sh | |
# Make git repo | |
git init | |
git add --all | |
git commit -a -m 'Initialized CodeIgniter Sunrise framework' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment