File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change 1
1
#!/usr/bin/env php
2
2
<?php
3
3
4
- ini_set ("phar.readonly " , "Off " );
5
- $ phar = new Phar ('git-deploy.phar ' , 0 , 'git-deploy ' );
6
- $ phar ->buildFromDirectory (dirname (__FILE__ ));
7
- $ phar ->setStub (file_get_contents (dirname (__FILE__ )."/index.php " ));
8
- unset($ phar );
9
- @unlink ('../git-deploy ' );
10
- rename ('git-deploy.phar ' , '../git-deploy ' );
4
+ if (ini_get ("phar.readonly " )) {
5
+ echo "You need to set the 'phar.readonly' option to 'Off' in your php.ini file ( " . php_ini_loaded_file () . ") " .PHP_EOL ;
6
+ } else {
7
+ $ phar = new Phar ('git-deploy.phar ' , 0 , 'git-deploy ' );
8
+ $ phar ->buildFromDirectory (dirname (__FILE__ ));
9
+ $ phar ->setStub (file_get_contents (dirname (__FILE__ ) . "/index.php " ));
10
+ unset($ phar );
11
+ @unlink ('../git-deploy ' );
12
+ rename ('git-deploy.phar ' , '../git-deploy ' );
13
+ echo "Built git-deploy successfully! " .PHP_EOL ;
14
+ }
You can’t perform that action at this time.
0 commit comments