alecpl
2011-04-20 6cc3f5887d7af3ad3b505a6f0fa62752314be1fe
- Use clisetup.php where possible, remove redundant code


5 files modified
29 ■■■■ changed files
bin/cleandb.sh 7 ●●●● patch | view | raw | blame | history
bin/decrypt.sh 7 ●●●● patch | view | raw | blame | history
bin/dumpschema.sh 7 ●●●● patch | view | raw | blame | history
bin/installto.sh 5 ●●●● patch | view | raw | blame | history
bin/update.sh 3 ●●●●● patch | view | raw | blame | history
bin/cleandb.sh
@@ -20,12 +20,9 @@
*/
if (php_sapi_name() != 'cli') {
    die('Not on the "shell" (php-cli).');
}
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
require INSTALL_PATH.'program/include/iniset.php';
require INSTALL_PATH.'program/include/clisetup.php';
// mapping for table name => primary key
$primary_keys = array(
bin/decrypt.sh
@@ -52,12 +52,9 @@
 *  - you are dealing with counterfeit header data.
 */
if (php_sapi_name() != 'cli') {
    die("Not on the 'shell' (php-cli).\n");
}
define('INSTALL_PATH', realpath(dirname(__FILE__).'/..') . '/');
require INSTALL_PATH . 'program/include/iniset.php';
require INSTALL_PATH . 'program/include/clisetup.php';
if ($argc < 2) {
    die("Usage: " . basename($argv[0]) . " encrypted-hdr-part [encrypted-hdr-part ...]\n");
bin/dumpschema.sh
@@ -20,12 +20,9 @@
*/
if (php_sapi_name() != 'cli') {
    die('Not on the "shell" (php-cli).');
}
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
require INSTALL_PATH.'program/include/iniset.php';
require INSTALL_PATH.'program/include/clisetup.php';
/** callback function for schema dump **/
function print_schema($dump)
bin/installto.sh
@@ -19,12 +19,9 @@
*/
if (php_sapi_name() != 'cli') {
    die('Not on the "shell" (php-cli).');
}
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/iniset.php';
require_once INSTALL_PATH . 'program/include/clisetup.php';
$target_dir = unslashify($_SERVER['argv'][1]);
bin/update.sh
@@ -19,9 +19,6 @@
*/
if (php_sapi_name() != 'cli') {
    die('Not on the "shell" (php-cli).');
}
define('INSTALL_PATH', realpath(dirname(__FILE__) . '/..') . '/' );
require_once INSTALL_PATH . 'program/include/clisetup.php';