Mercurial > hg > fapweb
changeset 482:e0fd4c7ae8fb
Update commandline help, remove the commandline option for target database
spec, for now at least.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 07 Dec 2013 12:56:19 +0200 |
parents | 259dd7eae46d |
children | adc788e7b5f4 |
files | createdb.php |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/createdb.php Sat Dec 07 10:49:33 2013 +0200 +++ b/createdb.php Sat Dec 07 12:56:19 2013 +0200 @@ -383,13 +383,17 @@ // if ($argc < 2) { - echo "Usage: ".$argv[0]." <mode> [args]\n". + echo + "CreateDB - Manage FAPWeb SQL database\n". + "(C) Copyright 2012-2013 ccr/TNSP\n". + "\n". + "Usage: ".$argv[0]." <mode> [args]\n". "Where mode is one of following:\n". "\n". - " new [dbspec] Create a new database with given PDO spec\n". + " new Create a new database with given PDO spec\n". " or default to the one in mconfig.inc.php\n". "\n". - " test [dbspec] Like new, but add initial test data.\n". + " test Like new, but add initial test data.\n". "\n". " upgrade [dbspec] Upgrade current database, if possible.\n". "\n"; @@ -405,12 +409,9 @@ exit; } -// Check if database spec provided, if not use default -if (($spec = stCArg(2)) === FALSE) - $spec = $siteSettings["sqlDB"]; - // Try to connect to database +$spec = $siteSettings["sqlDB"]; if (!stCLIConnectSQLDB($spec)) die("Could not connect to SQL database '".$spec."'.\n");