cleanup-script 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # Running this script cleanups XML's which conflicts with other
  3. # packages like foo2zjs, lexmark X125, etc.
  4. # Remove references to foo2zjs, foo2oak, foo2hp and foo2qpdl (bug #208851).
  5. # Also foo2lava, foo2kyo, foo2xqx (bug #438319).
  6. # Remove Samsung-CLP-300, Samsung-CLP-315 (bug #625505)
  7. find printer -name '*.xml' |grep -E 'Samsung-CLP-300|Samsung-CLP-315'|xargs rm -vf
  8. for x in zjs oak oak-z1 hp qpdl lava kyo xqx hiperc slx
  9. do
  10. find printer -name '*.xml' | xargs grep -l "<driver>foo2${x}"| xargs rm -vf
  11. rm -f driver/foo2${x}.xml opt/foo2${x}-*
  12. done
  13. # Same for m2300w/m2400w
  14. find printer -name '*.xml' |xargs grep -l '<driver>m2[34]00w<'|xargs rm -vf
  15. rm -f driver/m2300w.xml driver/m2400w.xml opt/m2300w-*
  16. # Same for all these.
  17. for x in drv_x125 ml85p pbm2lwxl pbmtozjs bjc800j
  18. do
  19. find printer -name '*.xml' |xargs grep -l "<driver>${x}</driver>"|xargs rm -vf
  20. rm -vf driver/${x}.xml opt/${x}-*
  21. done
  22. # We also have those one in foo2zjs
  23. #source/driver/foo2oak-z1.xml
  24. #source/driver/foo2slx.xml