function onCallback( err, pkgInfo ) {
		var fpath;
		if ( err && !repeatedTry ) {
			console.log( err );
			cleanCache();
			console.log( 'Trying again once more to process the following package: %s', pkg );
			repeatedTry = true;
			publish( pkg, onCallback );
		} else {
			if ( pkgInfo.status === 'skipped' ) {
				console.log( 'Skipped publishing package...' );
				pkgs[ idx ] = null;
			}
			else if ( pkgInfo.status === 'success' ) {
				console.log( 'Successfully published package %s to remote GitHub repository', pkgInfo.name );
				pkgs[ idx ] = pkgInfo;
			}
			idx += 1;
			pkg = pkgs[ idx ];
			repeatedTry = false;
			if ( pkg ) {
				console.log( 'Now processing the following package: %s', pkg );
				publish( pkg, onCallback );
			} else {
				console.log( 'All `stdlib` packages successfully pushed to GitHub...' );
				fpath = join( tmpdir(), 'stdlib_published_pkg_list.json' );
				writeFileSync( fpath, JSON.stringify( pkgs, null, '\t' ) );
			}
		}
	}
'
			]
		});
		if ( pkgs instanceof Error ) {
			debug( 'Unable to create an ordered package list. Error: %s', pkgs.message );
			throw pkgs;
		}
		debug( 'Successfully created an ordered package list.' );

		debug( 'Writing list to file...' );
		fpath = join( tmpdir(), 'stdlib_ordered_pkg_list.json' );
		err = writeFileSync( fpath, JSON.stringify( pkgs, null, '  ' )+'\n', {
			'encoding': 'utf8'
		});
		if ( err instanceof Error ) {
			debug( 'Unable to write list to file. Error: %s', err.message );
			throw err;
		}
		debug( 'Successfully wrote list to file.' );

		pkgs = pkgs.slice( START_PKG_INDEX, END_PKG_INDEX + 1 );
		if ( flags[ 'keep-alive' ] ) {
			pkgs = sample( pkgs, {
				'size': KEEP_ALIVE_SAMPLE_SIZE,
				'replace': false
			});
		}
		for ( i = 0; i < pkgs.length; i++ ) {
			pkgs[ i ] = replace( pkgs[ i ], '@stdlib/', '' );
		}
	} else {
		pkgs = args;
		for ( i = 0; i < pkgs.length; i++ ) {
			pkgs[ i ] = replace( pkgs[ i ], '@stdlib/', '' );
			pkgs[ i ] = trim( pkgs[ i ] );
		}
	}

	// Filter out packages:
	tmp = [];
	for ( i = 0; i < pkgs.length; i++ ) {
		if (
			!startsWith( pkgs[ i ], '_tools' ) && // Do not publish internal `stdlib` tooling packages
			!startsWith( pkgs[ i ], 'plot/' ) && // Do not publish individual `plot` package but do publish overall namespace
			!startsWith( pkgs[ i ], 'strided/common' ) // Do not publish namespace slated to go away
		) {
			tmp.push( pkgs[ i ] );
		}
	}
	pkgs = tmp;
	if ( flags[ 'skip-individual' ] ) {
		console.log( 'Do not publish individual packages...' );
		tmp = [];
		for ( i = 0; i < pkgs.length; i++ ) {
			if ( !contains( pkgs[ i ], '/' ) ) {
				tmp.push( pkgs[ i ] );
			}
		}
		pkgs = tmp;
	}
	if ( flags[ 'skip-toplevel' ] ) {
		console.log( 'Do not publish toplevel packages...' );
		tmp = [];
		for ( i = 0; i < pkgs.length; i++ ) {
			if ( contains( pkgs[ i ], '/' ) ) {
				tmp.push( pkgs[ i ] );
			}
		}
		pkgs = tmp;
	}
	if ( flags[ 'pattern' ] ) {
		console.log( 'Only publish packages matching the following pattern: '+flags[ 'pattern' ] );
		tmp = [];
		re = reFromString( rescape( '/'+flags[ 'pattern' ]+'/' ) );
		for ( i = 0; i < pkgs.length; i++ ) {
			if ( re.test( pkgs[ i ] ) ) {
				tmp.push( pkgs[ i ] );
			}
		}
		pkgs = tmp;
	}
	console.log( 'Publishing %d `stdlib` packages...', pkgs.length );
	idx = 0;
	pkg = pkgs[ idx ];
	console.log( 'Starting by processing the following package: %s', pkg );

	cleanCache();

	debug( 'Clean-up existing build directory...' );
	fs.rmSync( join( mainDir, 'build' ), {
		'recursive': true,
		'force': true
	});

	publish( pkg, onCallback );

	/**
Callback invoked once pushing package contents to remote GitHub repository.

@private
@param {(Error|null)} err - error object or `null`
@param {Object} pkgInfo - package information
@returns {void}