aboutsummaryrefslogtreecommitdiff
path: root/data/gen-resources
blob: 273f7db7848bd499a1693a9c7face7bca8b9c9d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

function gen_resource()
{
	INFILE=$1
	OUTFILE=$2

	echo "/*" > $OUTFILE
	echo " * This file was generated from $INFILE" >> $OUTFILE
	echo " * using the following command:" >> $OUTFILE
	echo " * xxd -i $INFILE $OUTFILE" >> $OUTFILE
	echo " *" >> $OUTFILE
	echo " * If you have 'xxd' installed, you can run the script" >> $OUTFILE
	echo " * data/gen-resources to re-create this file." >> $OUTFILE
	echo " */" >> $OUTFILE
	echo >> $OUTFILE
	xxd -i $INFILE >> $OUTFILE
}

gen_resource data/diffraction.cl src/diffraction.cl.h