5
Line | |
---|
1 | #! /bin/sh |
---|
2 | |
---|
3 | top=$(dirname $0) |
---|
4 | base="${top}/bsps" |
---|
5 | base_e=$(echo ${base} | sed -e 's/\//\\\//g') |
---|
6 | |
---|
7 | last_arch="" |
---|
8 | |
---|
9 | cfg_list=$(LANG=C LC_COLLATE=C find ${base} -mindepth 3 -name \*.cfg | sort) |
---|
10 | |
---|
11 | max_bsp_len=0 |
---|
12 | arch_count=0 |
---|
13 | bsp_count=0 |
---|
14 | |
---|
15 | for bsp_path in ${cfg_list}; |
---|
16 | do |
---|
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) |
---|
28 | done |
---|
29 | |
---|
30 | max_bsp_len=$(expr ${max_bsp_len} + 2) |
---|
31 | last_arch="" |
---|
32 | |
---|
33 | echo "RTEMS 5" |
---|
34 | echo " Architectures: ${arch_count}" |
---|
35 | echo " BSP Count: ${bsp_count}" |
---|
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//') |
---|
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}" |
---|
47 | done |
---|
48 | |
---|
49 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.