File: splb2splh.sh

package info (click to toggle)
spl 1.0~pre2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 2,240 kB
  • ctags: 1,987
  • sloc: ansic: 15,272; yacc: 3,167; sh: 272; makefile: 186; xml: 156
file content (19 lines) | stat: -rw-r--r-- 343 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

echo -e "{"

echo -e "\t.id ="
echo -e "\t\t\"$1\","

echo -e "\t.size ="
echo -e "\t\t$( wc -c $1 | awk '{ print $1; }' ),"

echo -e "\t.code ="
echo -e "\t(unsigned char*)"
echo "$( od -vb $1 | sed 's/^[^ ]* */	"\\/; s/ *$//; /[0-9]/ !d; s/ /\\/g; s/$/"/;' ),"

echo -e "\t.code_type ="
echo -e "\t\tSPL_CODE_STATIC"

echo "}"