Permalink
Browse files

Imrpove create scripts

  • Loading branch information...
1 parent a4ddf9c commit 5253ae09106615fba85332aba9e045e4e69ad923 @helgi committed Jan 27, 2012
Showing with 13 additions and 18 deletions.
  1. +1 −1 autoload/create.php
  2. +2 −2 cli/create.php
  3. +3 −8 combo/create.php
  4. +2 −2 example2/create.php
  5. +2 −2 example3/create.php
  6. +1 −1 phpmyadmin/phpmyadmin.php
  7. +2 −2 web/create.php
View
2 autoload/create.php
@@ -3,7 +3,7 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 autoload/create.php\n");
}
-@unlink('project.phar');
+@unlink(__DIR__ . '/project.phar');
$p = new Phar('project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
View
4 cli/create.php
@@ -3,8 +3,8 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 cli/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
$stub = <<<'EOD'
View
11 combo/create.php
@@ -3,7 +3,8 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 combo/create.php\n");
}
-$p = new Phar('project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
$stub = <<<'EOD'
@@ -14,10 +15,4 @@
include "phar://" . __FILE__ . DIRECTORY_SEPARATOR . "cli.php";
__HALT_COMPILER();
EOD;
-$p->setStub($stub);
-
- Phar::interceptFileFuncs();
- Phar::mungServer(array('REQUEST_URI', 'PHP_SELF', 'SCRIPT_NAME'));
- Phar::WebPhar(null, 'web.php');
- include "phar://" . __FILE__ . DIRECTORY_SEPARATOR . "cli.php";
- __HALT_COMPILER();
+$p->setStub($stub);
View
4 example2/create.php
@@ -3,7 +3,7 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 example2/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('example2/project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p['awesome.php'] = '<?php
echo "Hi Phar people! :-) Example 2\n";';
View
4 example3/create.php
@@ -3,6 +3,6 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 example3/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('example3/project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
View
2 phpmyadmin/phpmyadmin.php
@@ -3,7 +3,7 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 phpmyadmin.php\n");
}
-@unlink('phpmyadmin.phar');
+@unlink(__DIR__ . '/phpmyadmin.phar');
$a = new Phar(__DIR__ . '/phpmyadmin.phar', 0, 'phpmyadmin.phar');
$a->buildFromDirectory("phpMyAdmin-3.4.9-english");
$a->startBuffering();
View
4 web/create.php
@@ -3,8 +3,8 @@
die("Phar is in read-only mode, try php -d phar.readonly=0 web/create.php\n");
}
-@unlink('project.phar');
-$p = new Phar('project.phar', 0, 'project.phar');
+@unlink(__DIR__ . '/project.phar');
+$p = new Phar(__DIR__ . '/project.phar', 0, 'project.phar');
$p->buildFromDirectory(__DIR__);
$stub = <<<'EOD'

0 comments on commit 5253ae0

Please sign in to comment.