solitare/generate_images_qrc.sh

24 lines
311 B
Bash
Raw Normal View History

2024-12-01 00:01:37 +00:00
#!/bin/bash
set -euo pipefail
QRC="images.qrc"
IMG_DIR="img"
cat <<EOF >"$QRC"
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>
EOF
find "$IMG_DIR" -type f | while IFS= read -r file; do
printf " <file>%s</file>\n" "$file" >>"$QRC"
done
cat <<EOF >>"$QRC"
</qresource>
</RCC>
<!-- vi: ft=xml
-->
EOF