From: John Hodge Date: Wed, 2 Oct 2013 14:54:01 +0000 (+0800) Subject: Tools/udimkpkg - Hacky implementation, but it seems to work X-Git-Tag: rel0.15~148 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=0831b053a68bfa2605f9c2273c014ed0a9e2c784;p=tpg%2Facess2.git Tools/udimkpkg - Hacky implementation, but it seems to work --- diff --git a/Tools/udimkpkg/udimkpkg b/Tools/udimkpkg/udimkpkg new file mode 100755 index 00000000..4cd2a29e --- /dev/null +++ b/Tools/udimkpkg/udimkpkg @@ -0,0 +1,21 @@ +#!/bin/sh + +ABI=ia32 + +cat udiprops.txt | sed 's/#.*//' | grep -v 'source_files\|source_requires\|compile_options' | tr '\n' '\0' > .udiprops.bin + +shortname=`grep 'shortname ' udiprops.txt | head -n 1 | awk '{print $2}'` +firstmodule=`grep 'module ' udiprops.txt | head -n 1 | awk '{print $2}'` + +case $ABI in +ia32) + objcopy bin/$ABI/$firstmodule --add-section .udiprops=.udiprops.bin .primodule + ;; +esac + +outdir="udi-pkg.1/$shortname/2/$shortname" + +tar -cf $shortname.udi bin/$ABI/* --transform 's~.*~'$outdir'/\0~' +tar --delete -f $shortname.udi $outdir/bin/$ABI/$firstmodule +tar -uf $shortname.udi .primodule --transform s~.*~$outdir/bin/$ABI/$firstmodule~ +