From 543290d67fd6a12c3c3411309f84b773bc38b31f Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Fri, 10 May 2013 15:00:42 +0100 Subject: [PATCH] Adding a basic installer. --- .gitignore | 1 + install.php | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 install.php 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