-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathinstallmods.php
More file actions
41 lines (30 loc) · 868 Bytes
/
installmods.php
File metadata and controls
41 lines (30 loc) · 868 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/php
<?php
# This script installs, then sorts & hides modules
# according to a given .modules file
$dir = dirname(__FILE__) . "/scripts";
if (isset($argv[1]) && isset($argv[2])) {
$file = "$dir/$argv[1].modules";
if (is_readable($file)) {
# figure out where we're getting stuff from
switch ($argv[2]) {
case "dev":
$server = "dev.worldpossible.org";
break;
case "jeremy":
$server = "192.168.1.10";
break;
case "jfield":
$server = "192.168.1.6";
break;
default:
$server = $argv[2];
}
require_once("admin/common.php");
installmods($file, $server);
exit(0);
}
}
echo "Usage: php installmods.php modulesfile server\n";
exit(1);
?>