source: rtems/rtems-bsps @ a6e39d4a

5
Last change on this file since a6e39d4a was 003b192, checked in by Joel Sherrill <joel@…>, on 05/14/18 at 20:11:15

rtems-bsps: Change 4.12 to 5

  • Property mode set to 100755
File size: 1.2 KB
Line 
1#! /bin/sh
2
3top=$(dirname $0)
4base="${top}/bsps"
5base_e=$(echo ${base} | sed -e 's/\//\\\//g')
6
7last_arch=""
8
9cfg_list=$(LANG=C LC_COLLATE=C find ${base} -mindepth 3 -name \*.cfg | sort)
10
11max_bsp_len=0
12arch_count=0
13bsp_count=0
14
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 5"
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/\/config.*//")
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.