diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-01-31 15:57:22 +0100 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-01-31 15:57:22 +0100 |
commit | 3fb046353628229bb16fb0cacb11316b1d9534e7 (patch) | |
tree | a2c8c85a02cc19a6ced4410e9300044a49092d20 /scripts/showSamples.sh | |
parent | ed19d3f919d7cc2988efe86a862f94582eaf7ce5 (diff) | |
download | crosstool-ng-3fb046353628229bb16fb0cacb11316b1d9534e7.tar.gz crosstool-ng-3fb046353628229bb16fb0cacb11316b1d9534e7.tar.bz2 crosstool-ng-3fb046353628229bb16fb0cacb11316b1d9534e7.zip |
scripts: add action to dump current configuration in humane-readable form
Diffstat (limited to 'scripts/showSamples.sh')
-rwxr-xr-x | scripts/showSamples.sh | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh index 33e30816..71135854 100755 --- a/scripts/showSamples.sh +++ b/scripts/showSamples.sh @@ -20,14 +20,21 @@ dump_single_sample() { [ "$1" = "-w" ] && wiki=1 && shift local width="$1" local sample="$2" - if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then - sample_top="${CT_TOP_DIR}" - sample_type="l" - else - sample_top="${CT_LIB_DIR}" - sample_type="g" - fi - . "${sample_top}/samples/${sample}/crosstool.config" + case "${sample}" in + current) + sample_type="l" + . .config + ;; + *) if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then + sample_top="${CT_TOP_DIR}" + sample_type="l" + else + sample_top="${CT_LIB_DIR}" + sample_type="g" + fi + . "${sample_top}/samples/${sample}/crosstool.config" + ;; + esac if [ -z "${wiki}" ]; then t_width=13 printf "%-*s [%s" ${width} "${sample}" "${sample_type}" |