diff --git a/.gitignore b/.gitignore index d186d8a7..5c17a79b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .idea vendor/ composer.lock +composer.phar config.php .DS_Store diff --git a/install.php b/install.php new file mode 100644 index 00000000..ac7ceb3f --- /dev/null +++ b/install.php @@ -0,0 +1,46 @@ +#!/usr/bin/php +generate(); + +print 'INSTALLING: Composer' . PHP_EOL; +file_put_contents('./composerinstaller.php', file_get_contents('https://getcomposer.org/installer')); +shell_exec('php ./composerinstaller.php'); +unlink('./composerinstaller.php'); + +print 'RUNNING: Composer' . PHP_EOL; +shell_exec('./composer.phar install'); + + +function ask($question) +{ + print $question . ' '; + + $rtn = ''; + $fp = fopen('php://stdin', 'r'); + $rtn = fgets($fp); + fclose($fp); + + return trim($rtn); +} \ No newline at end of file