-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathcopy.php
More file actions
54 lines (46 loc) · 1.31 KB
/
copy.php
File metadata and controls
54 lines (46 loc) · 1.31 KB
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
<?php
/*
以下、コマンド見直し。これベースにするかねぇ特に後期
find ./ -maxdepth 1 -type f -newermt "2025-10-01" -exec cp -pt ~/CareerCollege/GameServer/2025/Sat34/ {} +
*/
//
$year = 2026;
//
$from = basename(__DIR__ . '/../wwwroot');
$to = __DIR__;
//
$param = [
2026 => [
'GameServer' => [
'Sat12' => 'S12',
'Sat34' => 'S34',
],
'Php' => [
'EarlyPeriodTue12' => 'T12',
'EarlyPeriodTue34' => 'T34',
'EarlyPeriodTue56' => 'T56',
//'EarlyPeriodSat56' => 'S56',
// Latter
],
],
];
foreach($param[$year] as $key => $val) {
foreach($val as $k => $v) {
// pathの作成
$fromo_path = __DIR__ . "/../wwwroot/{$v}";
$to_path = __DIR__ . "/{$key}/{$year}/{$k}/";
//
$cmd = "mkdir -p {$to_path} \n";
echo $cmd;
$cmd = "cp {$fromo_path}/*.php {$to_path} \n";
echo $cmd;
$cmd = "cp {$fromo_path}/*.html {$to_path} \n";
echo $cmd;
$cmd = "cp {$fromo_path}/*sql* {$to_path} \n";
echo $cmd;
$cmd = "cp {$fromo_path}/*xlsx {$to_path} \n";
echo $cmd;
$cmd = "cp {$fromo_path}/*csv {$to_path} \n";
echo $cmd;
}
}