mirror of
https://github.com/AppleCommander/ShrinkItArchive.git
synced 2024-12-21 11:29:45 +00:00
Adding some version information and fixing command-line to actually report version.
This commit is contained in:
parent
aafb68f75c
commit
3b04415763
@ -16,7 +16,9 @@ mainClassName = 'com.webcodepro.shrinkit.NufxScan'
|
||||
jar {
|
||||
manifest {
|
||||
attributes(
|
||||
'Main-Class': mainClassName
|
||||
'Main-Class': mainClassName,
|
||||
'Implementation-Title': 'ShrinkItArchive',
|
||||
'Implementation-Version': version
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# Universal ShrinkItArchive version number. Used for:
|
||||
# - Naming JAR file.
|
||||
# - The build will insert this into a file that is read at run time as well.
|
||||
version=1.2.1
|
||||
version=1.2.2
|
||||
|
||||
# Maven Central Repository G and A of GAV coordinate. :-)
|
||||
group=net.sf.applecommander
|
||||
|
@ -13,6 +13,12 @@ import com.webcodepro.shrinkit.io.LittleEndianByteInputStream;
|
||||
* @author robgreene@users.sourceforge.net
|
||||
*/
|
||||
public class NuFileArchive {
|
||||
public static final String VERSION;
|
||||
|
||||
static {
|
||||
VERSION = NuFileArchive.class.getPackage().getImplementationVersion();
|
||||
}
|
||||
|
||||
private MasterHeaderBlock master;
|
||||
private List<HeaderBlock> headers;
|
||||
private long totalSize = 0;
|
||||
|
@ -21,8 +21,14 @@ public class NufxScan {
|
||||
private static long sizeOfSmallestCompressedFile;
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
for (String dir : args) {
|
||||
scanDirectory(dir);
|
||||
if (args.length == 0) {
|
||||
System.out.println("Scan NuFX/Shrinkit archives. Please include at least one path name.");
|
||||
} else if (args.length == 1 && "-v".equals(args[0])) {
|
||||
System.out.printf("ShrinkIt Library version %s\n", NuFileArchive.VERSION);
|
||||
} else {
|
||||
for (String dir : args) {
|
||||
scanDirectory(dir);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user