source: rtems/rtems-bsps @ 717368c9

5
Last change on this file since 717368c9 was 717368c9, checked in by Chris Johns <chrisj@…>, on 12/13/15 at 12:22:53

Display only valid BSPs, ignore other .cfg files.

Show the architecture and BSP count.

Closes #2491.

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#! /bin/sh
2
3base="c/src/lib/libbsp"
4base_e=$(echo ${base} | sed -e 's/\//\\\//g')
5
6last_arch=""
7
8cfg_list=$(LANG=C LC_COLLATE=C find ${base} -name \*.cfg -depth 5 | sort)
9
10max_bsp_len=0
11arch_count=0
12bsp_count=0
13
14#set -x
15for bsp_path in ${cfg_list};
16do
17  arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//')
18  bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//')
19  len=${#bsp}
20  if test "${last_arch}" != "${arch}"; then
21    arch_count=$(expr ${arch_count} + 1)
22    last_arch=${arch}
23  fi
24  if [ $len -gt $max_bsp_len ]; then
25    max_bsp_len=$len
26  fi
27  bsp_count=$(expr ${bsp_count} + 1)
28done
29
30max_bsp_len=$(expr ${max_bsp_len} + 2)
31last_arch=""
32
33echo "RTEMS 4.11"
34echo " Architectures: ${arch_count}"
35echo " BSP Count: ${bsp_count}"
36for bsp_path in ${cfg_list};
37do
38 arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//')
39 bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//')
40 path=$(echo ${bsp_path} | sed -e "s/\/make.*//")
41 if test "${last_arch}" != "${arch}"; then
42   echo "${arch}:"
43   last_arch=${arch}
44 fi
45 spaces=$(echo ${bsp} | awk '{ printf("%*s", '${max_bsp_len}' -length(), " "); }')
46 echo " ${bsp}${spaces}${path}"
47done
48
49exit 0
Note: See TracBrowser for help on using the repository browser.