Skip to content

Instantly share code, notes, and snippets.

@sjlu
Created February 2, 2014 20:51
Show Gist options
  • Save sjlu/8774740 to your computer and use it in GitHub Desktop.
Save sjlu/8774740 to your computer and use it in GitHub Desktop.
A nice script to initialize a CodeIgniter Sunrise project.
#!/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