aboutsummaryrefslogtreecommitdiffstats
path: root/tests/enable_all.php
blob: b9320fa4edf3c16ef4736bfb8730dc16d44566c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
/**
 * SPDX-FileCopyrightText: 2016-2018 Nextcloud GmbH and Nextcloud contributors
 * SPDX-FileCopyrightText: 2012-2016 ownCloud, Inc.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

require_once __DIR__ . '/../lib/base.php';

function enableApp($app) {
	try {
		(new \OC_App())->enable($app);
	} catch (Exception $e) {
		echo $e;
	}
}

foreach (new \DirectoryIterator(__DIR__ . '/../apps/') as $file) {
	if ($file->isDot()) {
		continue;
	}
	if (!file_exists($file->getPathname() . '/.git')) {
		enableApp($file->getFilename());
	}
}