Tools/UDI - Misc touchups
[tpg/acess2.git] / Tools / udimkpkg / udimkpkg
1 #!/bin/sh
2
3 ABI=ia32
4
5 cat udiprops.txt | sed 's/ *#.*//' | grep -v '^$' | tr '\t' ' ' | grep -v 'source_files\|source_requires\|compile_options' | tr '\n' '\0' > .udiprops.bin
6
7 shortname=`grep 'shortname ' udiprops.txt | head -n 1 | awk '{print $2}'`
8 firstmodule=`grep 'module ' udiprops.txt | head -n 1 | awk '{print $2}'`
9
10 case $ABI in
11 ia32)
12         objcopy bin/$ABI/$firstmodule --add-section .udiprops=.udiprops.bin .primodule
13         ;;
14 esac
15
16 outdir="udi-pkg.1/$shortname/2/$shortname"
17
18 tar -cf $shortname.udi bin/$ABI/* --transform 's~.*~'$outdir'/\0~'
19 tar --delete -f $shortname.udi $outdir/bin/$ABI/$firstmodule
20 tar -uf $shortname.udi .primodule --transform s~.*~$outdir/bin/$ABI/$firstmodule~
21

UCC git Repository :: git.ucc.asn.au