Browse Source

Add console executables

tags/2018.05
Hypolite Petovan 2 years ago
parent
commit
dcf2ed26bb
3 changed files with 23 additions and 0 deletions
  1. +10
    -0
      bin/console
  2. +4
    -0
      bin/console.bat
  3. +9
    -0
      bin/console.php

+ 10
- 0
bin/console View File

@@ -0,0 +1,10 @@
#!/bin/sh

dir=$(cd "${0%[/\\]*}" > /dev/null; pwd)

if [[ -d /proc/cygdrive && $(which php) == $(readlink -n /proc/cygdrive)/* ]]; then
# We are in Cgywin using Windows php, so the path must be translated
dir=$(cygpath -m "$dir");
fi

php "${dir}/console.php" "$@"

+ 4
- 0
bin/console.bat View File

@@ -0,0 +1,4 @@
@echo OFF
:: in case DelayedExpansion is on and a path contains !
setlocal DISABLEDELAYEDEXPANSION
php "%~dp0console.php" %*

+ 9
- 0
bin/console.php View File

@@ -0,0 +1,9 @@
#!/bin/env php
<?php

include_once dirname(__DIR__) . '/boot.php';

$a = new Friendica\App(dirname(__DIR__));
\Friendica\BaseObject::setApp($a);

(new Friendica\Core\Console())->execute();

Loading…
Cancel
Save