1. #!/usr/bin/env aspl 2. #ENVARG= -groupingclass POSIX -wsname TRANSIENT -singlepass 3. 4. ;;*********************************************************************** 5. ;; jarcompare.aspl 6. ;; Compare two JAR archives 7. ;; Copyright © 2024 Bassem W. Jamaleddine 8. ;; 9. ;;*********************************************************************** 10. 11. endScriptIfShellArgsLessThan 2 12. 13. DEF FN cmp2sets := {gU {g\, %%1 %%2}{g\, %%2 %%1}{g&, %%1 %%2}} 14. 15. timeout 60 16. displayoff 17. d1 = ggjar(jarfile,$1,calchksum,1,calentropy,1) 18. d2 = ggjar(jarfile,$2,calchksum,1,calentropy,1) 19. 20. displayon 21. ks chksum size mtime ffl 22. print ############################################ 23. print # SHOWING SET COMPARISONS BETWEEN $1 and $2 24. print ############################################ 25. FN cmp2sets(d1,d2) 26. print ############################################ 27. print # SHOWING SET INTERSECTION WITH DIFFERENT CHECKSUMS BETWEEN $1 and $2 28. print ############################################ 29. f&`c~ d1 d2 30. print ############################################ 31. print # SHOWING SET SIMILARITY BETWEEN $1 and $2 32. print ############################################ 33. sim d1 d2 34. println 35. 36. endscript 37. 38. __END__ 39. 40. $00 compares two JAR archives 41. 42. $00 must be followed by the names of two JAR archives 43. 44. Example: To compare the two JAR archives /tmp/TX/27238-tx.jar and /tmp/TX/38141-tx.jar 45. 46. $00 /tmp/TX/27238-tx.jar /tmp/TX/38141-tx.jar 47.