Rev 82 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 82 | Rev 83 | ||
---|---|---|---|
Line 65... | Line 65... | ||
65 | foreach ($files_for_phar as $input_file_short => $input_file) { |
65 | foreach ($files_for_phar as $input_file_short => $input_file) { |
66 | echo "\tAdd: $input_file_short\n"; |
66 | echo "\tAdd: $input_file_short\n"; |
67 | $phar->addFromString ($input_file_short, php_strip_whitespace ($input_file)); |
67 | $phar->addFromString ($input_file_short, php_strip_whitespace ($input_file)); |
68 | } |
68 | } |
69 | 69 | ||
70 | $shebang = '#!/usr/bin/env php'; |
70 | $stub = "#!/usr/bin/env php\n"; |
- | 71 | $stub .= "<?php @ob_end_clean(); ?>"; // ob_end_clean() avoids that Shebang is sent to webserver daemon |
|
71 | $phar->setStub(($shebang ? $shebang . PHP_EOL : "") . $phar->createDefaultStub($main)); |
72 | $stub .= $phar->createDefaultStub($main); |
- | 73 | $phar->setStub($stub); |
|
72 | 74 | ||
73 | #$private = openssl_get_privatekey(file_get_contents(__DIR__.'/private.pem')); |
75 | #$private = openssl_get_privatekey(file_get_contents(__DIR__.'/private.pem')); |
74 | #$pkey = ''; |
76 | #$pkey = ''; |
75 | #openssl_pkey_export($private, $pkey); |
77 | #openssl_pkey_export($private, $pkey); |
76 | #$phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); |
78 | #$phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); |