source: rtems/rtems-bsps @ 11ff3a9

Last change on this file since 11ff3a9 was 8aa75d0c, checked in by Chris Johns <chrisj@…>, on Jul 6, 2016 at 3:01:39 AM

Config (.cfg) files are only valid if deeper than 5.

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