]> git.pld-linux.org Git - packages/CodeIgniter.git/blame - codeigniter-install
- drop obsolete and outdated manual inclusion of rpm macros
[packages/CodeIgniter.git] / codeigniter-install
CommitLineData
dc118460
ZU
1#!/bin/bash
2
3function help() {
4cat << EOF
5Usage: $0 html_path app_path
6html_path: directory, where your CodeIgniter's index.php is (e.g. ~/public_html/ci)
7app_path: directory, where your CodeIgniter programs are (e.g. ~/programs/CI)
8EOF
9}
10
11if [ $# -ne 2 ]; then
12 help
13 exit 1
14fi
15
16WEBDIR=$1
17APPDIR=$2
18CI_DIR=/usr/share/CodeIgniter
19
20echo "Create web-directory ($WEBDIR)"
21install -d $WEBDIR || exit 1
22echo "Copy install.php to $WEBDIR"
23install $CI_DIR/index.php $WEBDIR || exit 1
24sed -i "s@\$application_folder.*=.*@\$application_folder = \"$APPDIR\";@" $WEBDIR/index.php || exit 1
25
26echo "Create main app directory ($APPDIR)"
27install -d $APPDIR || exit 1
28echo "Creating directories to app directory"
1305dba9 29for dir in cache config controllers core errors helpers hooks language libraries logs models third_party; do
dc118460 30 install -d $APPDIR/$dir || exit 1
1305dba9 31 [ -d $CI_DIR/application/$dir ] && (cp -r -n $CI_DIR/application/$dir/* $APPDIR/$dir || exit 1)
dc118460
ZU
32done
33
34echo Installation done.
35
This page took 0.03294 seconds and 4 git commands to generate.