forked from Imagelibrary/rtems
FreeBSD standard shell does not support substring expansion.
Switch to using awk to get a string of spaces.
This commit is contained in:
@@ -8,7 +8,6 @@ last_arch=""
|
|||||||
cfg_list=$(LANG=C LC_COLLATE=C find ${base} -name \*.cfg | sort)
|
cfg_list=$(LANG=C LC_COLLATE=C find ${base} -name \*.cfg | sort)
|
||||||
|
|
||||||
max_bsp_len=0
|
max_bsp_len=0
|
||||||
spaces=" "
|
|
||||||
|
|
||||||
for bsp in ${cfg_list};
|
for bsp in ${cfg_list};
|
||||||
do
|
do
|
||||||
@@ -18,6 +17,7 @@ do
|
|||||||
max_bsp_len=$len
|
max_bsp_len=$len
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
max_bsp_len=$(expr ${max_bsp_len} + 2)
|
||||||
|
|
||||||
echo "RTEMS 4.11"
|
echo "RTEMS 4.11"
|
||||||
for bsp_path in ${cfg_list};
|
for bsp_path in ${cfg_list};
|
||||||
@@ -29,7 +29,8 @@ do
|
|||||||
echo "${arch}:"
|
echo "${arch}:"
|
||||||
last_arch=${arch}
|
last_arch=${arch}
|
||||||
fi
|
fi
|
||||||
echo " ${bsp}${spaces:${#bsp}}${path}"
|
spaces=$(echo ${bsp} | awk '{ printf("%*s", '${max_bsp_len}' -length(), " "); }')
|
||||||
|
echo " ${bsp}${spaces}${path}"
|
||||||
done
|
done
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user