source: rtems/rtems-bsps @ 6470d02

5
Last change on this file since 6470d02 was 6470d02, checked in by Chris Johns <chrisj@…>, on 12/16/15 at 00:48:41

Fix rtems-bsps for GNU find hosts.

Fixed as reported by Pavel:

https://lists.rtems.org/pipermail/devel/2015-December/013189.html

Closes #2498.

  • 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
[6470d02]8cfg_list=$(LANG=C LC_COLLATE=C find ${base} -depth 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
32echo "RTEMS 4.11"
[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.