summaryrefslogtreecommitdiff
path: root/scripts/showSamples.sh
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-09-05 11:20:38 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2008-09-05 11:20:38 (GMT)
commit57db77a46d1f02caae4548bb88391122d0089d25 (patch)
tree04b2653dcba141530620f8094082468024a3d935 /scripts/showSamples.sh
parent679e8feb9fb0e9322bf07712c6bf6888d0cb80c1 (diff)
Backport #975 from trunk:
Warn the user if he/she recalls a sample with EXPERIMENTAL features. Also, print the EXPERIMENTAL status when listing the samples. NB: even it is not purely a fix backport, it is still very important that the user gets warned about the EXPERIMENTAL status of the samples. /branches/1.2/scripts/showSamples.sh | 17 14 3 0 ++++++++++++++--- /branches/1.2/samples/samples.mk | 12 12 0 0 ++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-)
Diffstat (limited to 'scripts/showSamples.sh')
-rwxr-xr-xscripts/showSamples.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh
index 33bfba8..8bed5a8 100755
--- a/scripts/showSamples.sh
+++ b/scripts/showSamples.sh
@@ -18,15 +18,16 @@ dump_single_sample() {
local sample="$2"
if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
sample_top="${CT_TOP_DIR}"
- sample_type="local"
+ sample_type="l"
else
sample_top="${CT_LIB_DIR}"
- sample_type="global"
+ sample_type="g"
fi
. "${sample_top}/samples/${sample}/crosstool.config"
if [ -z "${wiki}" ]; then
printf " %-*s (%s" ${width} "${sample}" "${sample_type}"
- [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",broken"
+ [ -f "${sample_top}/samples/${sample}/broken" ] && printf ",B"
+ [ "${CT_EXPERIMENTAL}" = "y" ] && printf ",X"
echo ")"
if [ ${verbose} -ne 0 ]; then
echo " OS : ${CT_KERNEL}-${CT_KERNEL_VERSION}"
@@ -108,3 +109,13 @@ fi
for sample in "${@}"; do
( dump_single_sample ${opt} ${width} "${sample}" )
done
+
+if [ "${opt}" = -w ]; then
+ printf "^ Total: ${#@} samples | ||||||||||||"
+ echo ""
+elif [ -z "${opt}" ]; then
+ echo ' l (local) : sample was found in current directory'
+ echo ' g (global) : sample was installed with crosstool-NG'
+ echo ' X (EXPERIMENTAL): sample may use EXPERIMENTAL features'
+ echo ' B (BORKEN) : sample is currently broken'
+fi