blob: 69c4b9d9a75d9e56b8f9c4ce279b021dacaa3da9 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001#!/usr/local/bin/perl
2
3use Win32;
4
5my $cwd = Win32::GetCwd();
6
7my $upper_cwd = $cwd;
8
9my $upper_folder;
10
11print " cwd == \"$cwd\" \n";
12
13
14if ( $cwd =~ /[\s\w]*\\([\s\w]+)/ )
15{
16 if ( "$1" ne "" )
17 {
18 print "I got upper folder == \"$1\" \n";
19 $upper_folder = "$1";
20 } else
21 {
22 print " We can not match upper folder \n";
23 }
24} else
25{
26 print " We can not match upper folder \n";
27}
28
29 $upper_cwd =~ s/$upper_folder//;
30 $upper_folder =~ s/\s/_/;
31
32if ( -e "c:\\progra~1\\7-zip\\7z.exe" )
33{
34 system "date/t & time/t";
35 print "cd build & del *.obj /s /q ";
36 system "cd build & del *.obj /s /q ";
37 print "c:\\progra~1\\7-zip\\7z.exe a -mx=5 -r ${upper_cwd}${upper_folder}.7z $cwd \n";
38 system "c:\\progra~1\\7-zip\\7z.exe a -mx=5 -r ${upper_cwd}${upper_folder}.7z $cwd \n";
39 system "date/t & time/t";
40
41} else
42{
43 print " c:\\progra~1\\7-zip\\7z.exe not found \n";
44}
45
46
47
48exit 0;