liberate.sh 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/bash
  2. # Author: Tirifto
  3. # License: Public domain (see at the end)
  4. # Description: This script will find any skins under known non-free
  5. # licences, and will delete them. Numbering of the
  6. # remaining files will not be changed.
  7. grep -l '^CC BY-NC-SA' meta/*.txt > 'remove-these-files-1.txt'
  8. if [ -s 'remove-these-files-1.txt' ]
  9. then
  10. sed -e 's@meta/@textures/@' -e 's@.txt@.png@' \
  11. 'remove-these-files-1.txt' > 'remove-these-files-2.txt'
  12. sed 's@.png@_preview.png@' \
  13. 'remove-these-files-2.txt' > 'remove-these-files-3.txt'
  14. rm `cat remove-these-files-1.txt`
  15. rm `cat remove-these-files-2.txt`
  16. rm `cat remove-these-files-3.txt`
  17. rm 'remove-these-files-1.txt'
  18. rm 'remove-these-files-2.txt'
  19. rm 'remove-these-files-3.txt'
  20. fi
  21. # This is free and unencumbered software released into the public domain.
  22. #
  23. # Anyone is free to copy, modify, publish, use, compile, sell, or
  24. # distribute this software, either in source code form or as a compiled
  25. # binary, for any purpose, commercial or non-commercial, and by any
  26. # means.
  27. #
  28. # In jurisdictions that recognize copyright laws, the author or authors
  29. # of this software dedicate any and all copyright interest in the
  30. # software to the public domain. We make this dedication for the benefit
  31. # of the public at large and to the detriment of our heirs and
  32. # successors. We intend this dedication to be an overt act of
  33. # relinquishment in perpetuity of all present and future rights to this
  34. # software under copyright law.
  35. #
  36. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  37. # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  38. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
  39. # IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
  40. # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  41. # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. # OTHER DEALINGS IN THE SOFTWARE.