|
4 | 4 | * PharTools (v1.0) by EvolSoft |
5 | 5 | * Developer: EvolSoft (Flavius12) |
6 | 6 | * Website: http://www.evolsoft.tk |
7 | | - * Date: 23/04/2015 07:55 PM (UTC) |
| 7 | + * Date: 23/04/2015 08:02 PM (UTC) |
8 | 8 | * Copyright & License: (C) 2015 EvolSoft |
9 | 9 | * Licensed under MIT (https://github.com/EvolSoft/PharTools/blob/master/LICENSE) |
10 | 10 | */ |
|
33 | 33 | $compression = null; |
34 | 34 | for($i = 0; $i < count($params) - 1; $i++){ |
35 | 35 | //Check Compression |
36 | | - if($params[$i] == "-c" && substr($params[$i + 1], 1) != "-"){ |
| 36 | + if($params[$i] == "-c" && substr($params[$i + 1], 0, 1) != "-"){ |
37 | 37 | if(strtolower($params[$i + 1]) == "gzip" || strtolower($params[$i + 1]) == "gz"){ |
38 | 38 | $compression = Phar::GZ; |
39 | 39 | }elseif(strtolower($params[$i + 1]) == "bzip2" || strtolower($params[$i + 1]) == "bz2"){ |
|
43 | 43 | } |
44 | 44 | } |
45 | 45 | //Check Metadata |
46 | | - if($params[$i] == "-m" && substr($params[$i + 1], 1) != "-"){ |
| 46 | + if($params[$i] == "-m" && substr($params[$i + 1], 0, 1) != "-"){ |
47 | 47 | $metadata = stringToMetadata($params[$i + 1]); |
48 | 48 | } |
49 | 49 | //Check Stub |
50 | | - if($params[$i] == "-s" && substr($params[$i + 1], 1) != "-"){ |
| 50 | + if($params[$i] == "-s" && substr($params[$i + 1], 0, 1) != "-"){ |
51 | 51 | $stub = $params[$i + 1]; |
52 | 52 | } |
53 | 53 | //Check Regex |
54 | | - if($params[$i] == "-r" && substr($params[$i + 1], 1) != "-"){ |
| 54 | + if($params[$i] == "-r" && substr($params[$i + 1], 0, 1) != "-"){ |
55 | 55 | $regex = $params[$i + 1]; |
56 | 56 | } |
57 | 57 | } |
|
0 commit comments