#!/usr/local/bin php retrieve("1"); // get the admin user, just in case $current_user->is_admin = '1'; //initialize the module installer // Use PackageManager instead of ModuleInstaller for extra pre-checks $modInstaller = new PackageManager(); $modInstaller->silent = true; //shuts up the javscript progress bar // Squelch some warnings $GLOBALS[ 'app_list_strings' ][ 'moduleList' ] = Array(); // Check for already installed $new_upgrade = new UpgradeHistory(); $new_upgrade->name = $manifest['name']; if ($new_upgrade->checkForExisting($new_upgrade) !== null) { error_log("Already installed.\n"); exit(0); } //start installation echo "Patching $sugar_directory\n"; $modInstaller->performInstall($zip_file); echo "Success!\n"; exit(0);