source:
rtems/rtems-bsps
@
e0caabe
Last change on this file since e0caabe was 003b192, checked in by Joel Sherrill <joel@…>, on 05/14/18 at 20:11:15 | |
---|---|
|
|
File size: 1.2 KB |
Rev | Line | |
---|---|---|
[5c123985] | 1 | #! /bin/sh |
2 | ||
[1ce7bcb] | 3 | top=$(dirname $0) |
[adb85dd] | 4 | base="${top}/bsps" |
[5c123985] | 5 | base_e=$(echo ${base} | sed -e 's/\//\\\//g') |
6 | ||
7 | last_arch="" | |
8 | ||
[adb85dd] | 9 | cfg_list=$(LANG=C LC_COLLATE=C find ${base} -mindepth 3 -name \*.cfg | sort) |
[5c123985] | 10 | |
11 | max_bsp_len=0 | |
[717368c9] | 12 | arch_count=0 |
13 | bsp_count=0 | |
[5c123985] | 14 | |
[717368c9] | 15 | for bsp_path in ${cfg_list}; |
[5c123985] | 16 | do |
[717368c9] | 17 | arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//') |
18 | bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//') | |
[5c123985] | 19 | len=${#bsp} |
[717368c9] | 20 | if test "${last_arch}" != "${arch}"; then |
21 | arch_count=$(expr ${arch_count} + 1) | |
22 | last_arch=${arch} | |
23 | fi | |
[5c123985] | 24 | if [ $len -gt $max_bsp_len ]; then |
25 | max_bsp_len=$len | |
26 | fi | |
[717368c9] | 27 | bsp_count=$(expr ${bsp_count} + 1) |
[5c123985] | 28 | done |
[717368c9] | 29 | |
[76ad756c] | 30 | max_bsp_len=$(expr ${max_bsp_len} + 2) |
[717368c9] | 31 | last_arch="" |
[5c123985] | 32 | |
[003b192] | 33 | echo "RTEMS 5" |
[717368c9] | 34 | echo " Architectures: ${arch_count}" |
35 | echo " BSP Count: ${bsp_count}" | |
[5c123985] | 36 | for bsp_path in ${cfg_list}; |
37 | do | |
38 | arch=$(echo ${bsp_path} | sed -e "s/${base_e}*\///" -e 's/\/.*//') | |
39 | bsp=$(echo ${bsp_path} | sed -e "s/.*\///" -e 's/\.cfg//') | |
[adb85dd] | 40 | path=$(echo ${bsp_path} | sed -e "s/\/config.*//") |
[5c123985] | 41 | if test "${last_arch}" != "${arch}"; then |
42 | echo "${arch}:" | |
43 | last_arch=${arch} | |
44 | fi | |
[76ad756c] | 45 | spaces=$(echo ${bsp} | awk '{ printf("%*s", '${max_bsp_len}' -length(), " "); }') |
46 | echo " ${bsp}${spaces}${path}" | |
[5c123985] | 47 | done |
48 | ||
49 | exit 0 |
Note: See TracBrowser
for help on using the repository browser.