-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathpatch.php
83 lines (69 loc) · 2.23 KB
/
patch.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
// push into the game
// pull out of the game
if($_SERVER['argc'] !== 3) {
echo "php patch.php <mode> <what>";
exit(0);
}
list($Script,$Mode,$What) = $_SERVER['argv'];
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
$Files = [
'sfnone' => [
'scripts\source\dse_dm_ExternSexFrameworkInterface.psc'
=> 'patches\dse_dm_ExternSexFrameworkInterface-None.psc',
'scripts\dse_dm_ExternSexFrameworkInterface.pex'
=> 'patches\dse_dm_ExternSexFrameworkInterface-None.pex'
],
'sfsl' => [
'scripts\source\dse_dm_ExternSexFrameworkInterface.psc'
=> 'patches\dse_dm_ExternSexFrameworkInterface-SexLab.psc',
'scripts\dse_dm_ExternSexFrameworkInterface.pex'
=> 'patches\dse_dm_ExternSexFrameworkInterface-SexLab.pex'
],
'sfos' => [
'scripts\source\dse_dm_ExternSexFrameworkInterface.psc'
=> 'patches\dse_dm_ExternSexFrameworkInterface-OStim.psc',
'scripts\dse_dm_ExternSexFrameworkInterface.pex'
=> 'patches\dse_dm_ExternSexFrameworkInterface-OStim.pex'
],
'slaon' => [
'scripts\source\dse_dm_ExternSexlabAroused.psc'
=> 'patches\dse_dm_ExternSexlabAroused-On.psc',
'scripts\dse_dm_ExternSexlabAroused.pex'
=> 'patches\dse_dm_ExternSexlabAroused-On.pex'
],
'slaoff' => [
'scripts\source\dse_dm_ExternSexlabAroused.psc'
=> 'patches\dse_dm_ExternSexlabAroused-Off.psc',
'scripts\dse_dm_ExternSexlabAroused.pex'
=> 'patches\dse_dm_ExternSexlabAroused-Off.pex'
]
];
function CopyTheFiles(array $Input) {
$Prefix = getcwd();
foreach($Input as $Src => $Dest) {
echo PHP_EOL, "{$Src}", PHP_EOL, "=> {$Dest}", PHP_EOL;
copy(
"{$Prefix}\\{$Src}",
"{$Prefix}\\{$Dest}"
);
}
return;
}
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
if(!array_key_exists($What,$Files))
throw new Exception('invalid what');
switch($Mode) {
case 'push':
CopyTheFiles(array_flip($Files[$What]));
break;
case 'pull':
CopyTheFiles($Files[$What]);
break;
default:
throw new Exception('invalid mode');
break;
}
echo PHP_EOL;