5 Usage: $0 html_path app_path
6 html_path: directory, where your CodeIgniter's index.php is (e.g. ~/public_html/ci)
7 app_path: directory, where your CodeIgniter programs are (e.g. ~/programs/CI)
18 CI_DIR
=/usr
/share
/pear
/codeigniter
20 echo "Create web-directory ($WEBDIR)"
21 install -d $WEBDIR ||
exit 1
22 echo "Copy index.php to $WEBDIR"
23 install $CI_DIR/index.php
$WEBDIR ||
exit 1
24 sed -i "s@\$application_folder.*=.*@\$application_folder = \"$APPDIR\";@" $WEBDIR/index.php ||
exit 1
25 sed -i "59 s@\$system_path.*=.*@\$system_path = \"$CI_DIR/system\";@" $WEBDIR/index.php ||
exit 1
27 echo "Create main app directory ($APPDIR)"
28 install -d $APPDIR ||
exit 1
29 echo "Creating directories to app directory"
30 for dir
in cache config controllers core errors helpers hooks language libraries logs models third_party views
; do
31 install -d $APPDIR/$dir ||
exit 1
32 [ -d $CI_DIR/application
/$dir ] && (cp -r -n $CI_DIR/application
/$dir/* $APPDIR/$dir ||
exit 1)
35 echo Installation
done.