@@ -17,22 +17,36 @@ function run($path, $command)
17
17
print `cd $ path && $ command `;
18
18
}
19
19
20
+ //install composer
21
+ print "Install/Update composer \n" ;
22
+ if (is_file (__DIR__ .'/composer.phar ' )) {
23
+ run (__DIR__ , 'php composer.phar self-update ' );
24
+ } else {
25
+ run (__DIR__ , 'curl -sS https://getcomposer.org/installer | php ' );
26
+ }
27
+
28
+ print "Get libraries \n" ;
29
+ run (MODULE_DIR , 'php build/composer.phar install ' );
30
+
20
31
print "Starting... \n" ;
21
32
run (__DIR__ , 'mkdir ' . BUILD_DIR );
22
33
23
34
print "Copying files... \n" ;
24
35
25
- run (__DIR__ , 'cp -r ' . MODULE_DIR .'/classes ' . BUILD_DIR );
26
- run (__DIR__ , 'cp -r ' . MODULE_DIR .'/install ' . BUILD_DIR );
27
- run (__DIR__ , 'cp -r ' . MODULE_DIR .'/options ' . BUILD_DIR );
28
- run (__DIR__ , 'cp -r ' . MODULE_DIR .'/lang ' . BUILD_DIR );
29
- run (__DIR__ , 'cp ' . MODULE_DIR .'/include.php ' . BUILD_DIR );
30
- run (__DIR__ , 'cp ' . MODULE_DIR .'/options.php ' . BUILD_DIR );
36
+ run (__DIR__ , 'cp -r ' . MODULE_DIR .'/classes ' . BUILD_DIR );
37
+ run (__DIR__ , 'cp -r ' . MODULE_DIR .'/install ' . BUILD_DIR );
38
+ run (__DIR__ , 'cp -r ' . MODULE_DIR .'/options ' . BUILD_DIR );
39
+ run (__DIR__ , 'cp -r ' . MODULE_DIR .'/lang ' . BUILD_DIR );
40
+ run (__DIR__ , 'cp -r ' . MODULE_DIR .'/vendor ' . BUILD_DIR );
41
+ run (__DIR__ , 'cp ' . MODULE_DIR .'/composer.json ' . BUILD_DIR );
42
+ run (__DIR__ , 'cp ' . MODULE_DIR .'/composer.lock ' . BUILD_DIR );
43
+ run (__DIR__ , 'cp ' . MODULE_DIR .'/include.php ' . BUILD_DIR );
44
+ run (__DIR__ , 'cp ' . MODULE_DIR .'/options.php ' . BUILD_DIR );
31
45
32
46
print "Creating archive... \n" ;
33
47
34
48
run (__DIR__ , "rm -f mk.rees46- {$ version }.zip mk.rees46- {$ version }-utf8.zip " );
35
49
run (__DIR__ , "zip -r mk.rees46- {$ version }.zip mk.rees46 " );
36
- run (__DIR__ .'/mk.rees46 ' , "find -iname \\*.php -exec sh -c 'iconv -f cp1251 -t utf8 {} > {}.tmp && rm -f {} && mv {}.tmp {}' \\; " );
50
+ run (__DIR__ .'/mk.rees46/lang ' , "find -iname \\*.php -exec sh -c 'iconv -f cp1251 -t utf8 {} > {}.tmp && rm -f {} && mv {}.tmp {}' \\; " );
37
51
run (__DIR__ , "zip -r mk.rees46- {$ version }-utf8.zip mk.rees46 " );
38
52
run (__DIR__ , 'rm -rf mk.rees46 ' );
0 commit comments