Skip to content

Instantly share code, notes, and snippets.

@sjlu sjlu/sunrise.sh
Created Feb 2, 2014

Embed
What would you like to do?
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
You can’t perform that action at this time.