summaryrefslogtreecommitdiff
path: root/rtems-bsps
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2014-07-10 15:56:11 +1000
committerChris Johns <chrisj@rtems.org>2014-07-10 15:56:11 +1000
commit76ad756c09968d7b03fed88cdcebf2e5e54266e6 (patch)
tree9acc199bf648ba7af9061a1f2ff659de876e28c7 /rtems-bsps
parente1f446d3c1adb0e5d37b879be421fb201594235d (diff)
FreeBSD standard shell does not support substring expansion.
Switch to using awk to get a string of spaces.
Diffstat (limited to 'rtems-bsps')
-rwxr-xr-xrtems-bsps5
1 files changed, 3 insertions, 2 deletions
diff --git a/rtems-bsps b/rtems-bsps
index 210756fc75..3f353a6a2e 100755
--- a/rtems-bsps
+++ b/rtems-bsps
@@ -8,7 +8,6 @@ last_arch=""
cfg_list=$(LANG=C LC_COLLATE=C find ${base} -name \*.cfg | sort)
max_bsp_len=0
-spaces=" "
for bsp in ${cfg_list};
do
@@ -18,6 +17,7 @@ do
max_bsp_len=$len
fi
done
+max_bsp_len=$(expr ${max_bsp_len} + 2)
echo "RTEMS 4.11"
for bsp_path in ${cfg_list};
@@ -29,7 +29,8 @@ do
echo "${arch}:"
last_arch=${arch}
fi
- echo " ${bsp}${spaces:${#bsp}}${path}"
+ spaces=$(echo ${bsp} | awk '{ printf("%*s", '${max_bsp_len}' -length(), " "); }')
+ echo " ${bsp}${spaces}${path}"
done
exit 0