addDescription( <<addArg( 'action', 'One of "update", "verify" or "make-sri"', true ); $this->addArg( 'module', 'Name of a single module (Default: all)', false ); $this->addOption( 'verbose', 'Be verbose', false, false, 'v' ); } /** * @return bool * @throws Exception */ public function execute() { global $IP; $frm = new ForeignResourceManager( "{$IP}/resources/lib/foreign-resources.yaml", "{$IP}/resources/lib", function ( $text ) { $this->output( $text ); }, function ( $text ) { $this->error( $text ); }, function ( $text ) { if ( $this->hasOption( 'verbose' ) ) { $this->output( $text ); } } ); $action = $this->getArg( 0 ); $module = $this->getArg( 1, 'all' ); return $frm->run( $action, $module ); } } $maintClass = ManageForeignResources::class; require_once RUN_MAINTENANCE_IF_MAIN;