-
Notifications
You must be signed in to change notification settings - Fork 1
/
twig.mod
35 lines (27 loc) · 854 Bytes
/
twig.mod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* This mod adds the layout library Twig to CI
*
*/
// Get the latest CI
echo "Fetching latest Twig from github.com/eriktorsner....\n";
$cmd = "git clone [email protected]:eriktorsner/Twig-Codeigniter.git";
exec($cmd);
// get the submodule
echo "Fetching Twig as a submodule.\n";
chdir("Twig-Codeigniter");
$cmd = "git submodule init";
echo exec($cmd);
$cmd = "git submodule update";
exec($cmd);
chdir("..");
echo "Moving into project folders....\n";
$cmd = "mv Twig-Codeigniter/application/config/twig.php $ci_folder/application/config/";
exec($cmd);
$cmd = "mv Twig-Codeigniter/application/libraries/Twig.php $ci_folder/application/libraries/";
exec($cmd);
$cmd = "mv Twig-Codeigniter/application/third_party/Twig $ci_folder/application/third_party/";
exec($cmd);
echo "Cleaning up....\n";
$cmd = "rm -rf Twig-Codeigniter/";
exec($cmd);