C++ Library containing a lot of needful things: Stack Trace, Command Line Parser, Resource Handling, Configuration Files, Unix Command Execution, Directories, Regular Expressions, Tokenizer, Function Trace, Standard Extensions.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build-resource-file.sh 852B

12345678910111213141516171819202122232425262728293031
  1. #! /bin/bash -ex
  2. ## @id $Id$
  3. ## build resource.qrc file from a resource directory
  4. ##
  5. ## Argument: $1: resource path (default: resources)
  6. ## Result: file named <resource-path>.qrc (default: resources.qrc)
  7. ##
  8. ## Call:
  9. ##
  10. ## cd src
  11. ## ../build-resource-file.sh
  12. ## 1 2 3 4 5 6 7 8
  13. ## 45678901234567890123456789012345678901234567890123456789012345678901234567890
  14. RESOURCES=${1:-resources}
  15. TARGET=${RESOURCES}.qrc
  16. test -d ${RESOURCES}
  17. echo "<RCC>" > ${TARGET}
  18. for d in $(find resources -mindepth 1 -type d); do
  19. echo " <qresource prefix=\"${d#${RESOURCES}/}\">" >> ${TARGET}
  20. for f in $(find $d -mindepth 1 -maxdepth 1 -type f); do
  21. echo " <file alias=\"${f##*/}\">$f</file>" >> ${TARGET}
  22. done
  23. echo " </qresource>" >> ${TARGET}
  24. done
  25. echo "</RCC>" >> ${TARGET}