Create packer with recursive inclusion and deduplication
This commit is contained in:
@ -1,6 +1,10 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Very simple script, recursively parses a PHP file replacing all includes with the file, no deduplication
|
||||
*/
|
||||
|
||||
function line(string $text): void
|
||||
{
|
||||
echo $text . PHP_EOL;
|
||||
@ -57,7 +61,7 @@ $lines = replaceIncludes($fromFile);
|
||||
$toFileHandle = fopen($toFile, 'w');
|
||||
foreach ($lines as $line) {
|
||||
fwrite($toFileHandle, $line);
|
||||
chmod($toFile, 0755);
|
||||
chmod($toFile, fileperms($fromFile));
|
||||
}
|
||||
fwrite($toFileHandle, PHP_EOL);
|
||||
fclose($toFileHandle);
|
Reference in New Issue
Block a user