source:
trunk/MagicSoft/Mars/macros/tar.C@
1316
Last change on this file since 1316 was 1316, checked in by , 23 years ago | |
---|---|
File size: 363 bytes |
Line | |
---|---|
1 | void tar() |
2 | { |
3 | TString dir = gSystem->pwd(); |
4 | |
5 | Int_t slash = dir.Last('/'); |
6 | |
7 | TString name = &dir[slash+1]; |
8 | |
9 | gSystem->cd(".."); |
10 | |
11 | TString cmd = "tar cvf "+name+".tar --exclude=Root "+name+"/.rootrc "+name+"/*"; |
12 | |
13 | cout << "Executing: " << cmd << endl; |
14 | |
15 | gSystem->Exec(cmd); |
16 | gSystem->Exec("gzip -9 "+name+".tar"); |
17 | |
18 | gSystem->cd(name); |
19 | } |
Note:
See TracBrowser
for help on using the repository browser.