source: rtems/rtems-bsps @ 6470d02

Last change on this file since 6470d02 was 6470d02, checked in by Chris Johns <chrisj@…>, on Dec 16, 2015 at 12:48:41 AM

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
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} -depth 5 -name \*.cfg | sort)
9
10max_bsp_len=0
11arch_count=0
12bsp_count=0
13
14for bsp_path in ${cfg_list};
15do
16  arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//')
17  bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//')
18  len=${#bsp}
19  if test "${last_arch}" != "${arch}"; then
20    arch_count=$(expr ${arch_count} + 1)
21    last_arch=${arch}
22  fi
23  if [ $len -gt $max_bsp_len ]; then
24    max_bsp_len=$len
25  fi
26  bsp_count=$(expr ${bsp_count} + 1)
27done
28
29max_bsp_len=$(expr ${max_bsp_len} + 2)
30last_arch=""
31
32echo "RTEMS 4.11"
33echo " Architectures: ${arch_count}"
34echo " BSP Count: ${bsp_count}"
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
44 spaces=$(echo ${bsp} | awk '{ printf("%*s", '${max_bsp_len}' -length(), " "); }')
45 echo " ${bsp}${spaces}${path}"
46done
47
48exit 0
Note: See TracBrowser for help on using the repository browser.