static function run_generate_extension_config( $task=null, $args=array(), $cliopts=array() )
    {
        self::setConfigDir( $cliopts );
        $overwrite = @$cliopts['overwrite-existing'];
        if ( count( $args ) == 0 )
        {
            throw new pakeException( "Missing extension name" );
        }
        $extname = $args[0];
        $configfile = self::getOptionsDir() . "/options-$extname.yaml";
        if ( file_exists( $configfile ) && ! $overwrite )
        {
            pake_echo( "File $configfile already exists. Must overwrite it to continue" );
            $ok = pake_input( "Do you want to overwrite it? [y/n]", 'n' );
            if ( $ok != 'y' )
            {
                return;
            }
        }
        pake_mkdirs( self::getOptionsDir() );
        pake_copy( self::getResourceDir() . '/options-sample.yaml', $configfile, array( 'override' => true ) );
        pake_echo( "Created file $configfile, now go and edit it" );
    }