summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-05-18 09:38:51 +0200
committerKoen Kooi <koen@openembedded.org>2010-05-18 11:48:52 +0200
commit48849e915d3116b20514fdaef5b56dc49e61887e (patch)
treecee5bb21739b6f22dedc80e20cb42ca1b6b95022 /contrib
parentf2f3cff6cfcd46a0dae0e0f90e27fc246c6edc32 (diff)
extract-feedarch: script to extract machine and feedarch from angstrom-feed-config packages
Diffstat (limited to 'contrib')
-rw-r--r--contrib/angstrom/extract-feedarch.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/contrib/angstrom/extract-feedarch.sh b/contrib/angstrom/extract-feedarch.sh
new file mode 100644
index 0000000000..644be25386
--- /dev/null
+++ b/contrib/angstrom/extract-feedarch.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+if [ ! -d archs ] ; then
+ mkdir archs
+fi
+
+for feedconfig in $(find . -name "angstrom-feed-configs_*") ; do
+ rm -rf feedtemp ; mkdir feedtemp
+ dpkg-deb -X $feedconfig feedtemp >& /dev/null
+ echo $(tail -n1 feedtemp/etc/opkg/arch.conf | awk '{print $2}') >> archs/$(tail -n2 feedtemp/etc/opkg/arch.conf | head -n1 | awk '{print $2}')
+ rm -rf feedtemp
+done
+
+# Fixups
+cat archs/iwmmxt >> archs/armv5te || true
+cat archs/omap3517-evm >> archs/armv7a || true
+rm -f archs/arm archs/iwmmxt archs/omap3517-evm
+touch archs/iwmmxt archs/sparc
+touch archs/sparc
+
+# "mipsel")
+# machines="";;
+
+cat /tmp/sort-head.sh
+for arch in archs/* ; do
+ echo -e "\t\"$(basename $arch)\")"
+ cat $arch | sort | awk '{print $1}' | uniq | xargs echo -ne '\t\t\tmachines="' | sed -e 's:machines=" :machines=":g'
+ echo '" ;;'
+ cat $arch | sort | awk '{print $1}' | uniq > /tmp/feedsort && mv /tmp/feedsort $arch
+done
+cat /tmp/sort-footer.sh
+