#!/bin/sh # This script generates resource files. # Usage: ./resource.sh # Resource file is printed to stdout. # Usable variables ( is stripped from path and extension): # const char *_rc; // File content in binary format # const unsigned /dev/null) dump=$(${hd} "${fmt}" "${1}" 2>/dev/null) # Format file size variable echo "static const unsigned ${header}_size = ${size};" # Format file content dump echo "static const char ${header}[] = { " echo "${dump}0x00 };"