Skip to content
This repository was archived by the owner on Dec 27, 2023. It is now read-only.

Commit f12a3bf

Browse files
committed
First bits of structure
1 parent e680b7c commit f12a3bf

File tree

4 files changed

+53
-1
lines changed

4 files changed

+53
-1
lines changed

box.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"alias": "jupyter-php-installer.phar",
3+
"chmod": "0755",
4+
"directories": ["src"],
5+
"files": [
6+
"LICENSE",
7+
"README.md"
8+
],
9+
"finder": [
10+
{
11+
"name": "*.php",
12+
"exclude": ["Tests"],
13+
"in": "vendor"
14+
}
15+
],
16+
"git-version": "package_version",
17+
"main": "src/EntryPoint/main.php",
18+
"output": "jupyter-php-installer.phar",
19+
"stub": true
20+
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"type": "project",
55
"license": "MIT",
66
"require": {
7-
"php": "5.*,>=5.4"
7+
"php": "5.*,>=5.5.9",
8+
"symfony/console": "~2.8"
89
},
910
"require-dev": {
1011
"kherge/box": "~2.4"

src/EntryPoint/bootstrap.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/*
4+
* This file is part of Composer (and modified to fit in Jupyter-PHP-Installer)
5+
*
6+
* (c) Nils Adermann <naderman@naderman.de>
7+
* Jordi Boggiano <j.boggiano@seld.be>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
function includeIfExists($file)
13+
{
14+
return file_exists($file) ? include $file : false;
15+
}
16+
17+
if ((!$loader = includeIfExists(__DIR__ . '/../../vendor/autoload.php'))) {
18+
echo 'The dependencies are missing, you should use `composer install`.'.PHP_EOL;
19+
exit(1);
20+
}
21+
22+
return $loader;

src/EntryPoint/main.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
if ('cli' !== PHP_SAPI) {
5+
echo 'Warning: This command should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
6+
}
7+
8+
require_once __DIR__ . '/bootstrap.php';
9+

0 commit comments

Comments
 (0)