mirror of
https://github.com/AppleCommander/ShrinkItArchive.git
synced 2024-12-22 02:31:00 +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 {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
attributes(
|
attributes(
|
||||||
'Main-Class': mainClassName
|
'Main-Class': mainClassName,
|
||||||
|
'Implementation-Title': 'ShrinkItArchive',
|
||||||
|
'Implementation-Version': version
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Universal ShrinkItArchive version number. Used for:
|
# Universal ShrinkItArchive version number. Used for:
|
||||||
# - Naming JAR file.
|
# - Naming JAR file.
|
||||||
# - The build will insert this into a file that is read at run time as well.
|
# - 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. :-)
|
# Maven Central Repository G and A of GAV coordinate. :-)
|
||||||
group=net.sf.applecommander
|
group=net.sf.applecommander
|
||||||
|
@ -13,6 +13,12 @@ import com.webcodepro.shrinkit.io.LittleEndianByteInputStream;
|
|||||||
* @author robgreene@users.sourceforge.net
|
* @author robgreene@users.sourceforge.net
|
||||||
*/
|
*/
|
||||||
public class NuFileArchive {
|
public class NuFileArchive {
|
||||||
|
public static final String VERSION;
|
||||||
|
|
||||||
|
static {
|
||||||
|
VERSION = NuFileArchive.class.getPackage().getImplementationVersion();
|
||||||
|
}
|
||||||
|
|
||||||
private MasterHeaderBlock master;
|
private MasterHeaderBlock master;
|
||||||
private List<HeaderBlock> headers;
|
private List<HeaderBlock> headers;
|
||||||
private long totalSize = 0;
|
private long totalSize = 0;
|
||||||
|
@ -21,10 +21,16 @@ public class NufxScan {
|
|||||||
private static long sizeOfSmallestCompressedFile;
|
private static long sizeOfSmallestCompressedFile;
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
|
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) {
|
for (String dir : args) {
|
||||||
scanDirectory(dir);
|
scanDirectory(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void scanDirectory(String dirName) throws IOException {
|
private static void scanDirectory(String dirName) throws IOException {
|
||||||
File dir = new File(dirName);
|
File dir = new File(dirName);
|
||||||
|
Loading…
Reference in New Issue
Block a user