Tools/udimkpkg - Hacky implementation, but it seems to work
authorJohn Hodge <[email protected]>
Wed, 2 Oct 2013 14:54:01 +0000 (22:54 +0800)
committerJohn Hodge <[email protected]>
Wed, 2 Oct 2013 14:54:01 +0000 (22:54 +0800)
Tools/udimkpkg/udimkpkg [new file with mode: 0755]

diff --git a/Tools/udimkpkg/udimkpkg b/Tools/udimkpkg/udimkpkg
new file mode 100755 (executable)
index 0000000..4cd2a29
--- /dev/null
@@ -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~
+

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