summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions4
-rw-r--r--scripts/scripts.mk8
-rwxr-xr-xscripts/showSamples.sh7
3 files changed, 12 insertions, 7 deletions
diff --git a/scripts/functions b/scripts/functions
index 8665346..2261b8d 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -14,7 +14,7 @@ CT_OnError() {
# To avoid printing the backtace for each sub-shell
# up to the top-level, just remember we've dumped it
if [ ! -f "${CT_WORK_DIR}/backtrace" ]; then
- touch "${CT_WORK_DIR}/backtrace"
+ [ -d "${CT_WORK_DIR}" ] && touch "${CT_WORK_DIR}/backtrace"
# Print steps backtrace
step_depth=${CT_STEP_COUNT}
@@ -178,7 +178,7 @@ CT_DoLog() {
if [ $# -eq 0 ]; then
cat -
else
- printf "%s\n" "${*}"
+ echo -e "${*}"
fi |( IFS="${CR}" # We want the full lines, even leading spaces
_prog_bar_cpt=0
_prog_bar[0]='/'
diff --git a/scripts/scripts.mk b/scripts/scripts.mk
index 8373f9b..77368a7 100644
--- a/scripts/scripts.mk
+++ b/scripts/scripts.mk
@@ -33,16 +33,16 @@ endif
PHONY += scripts
scripts:
- @$(ECHO) ' MKDIR $@'
+ @$(CT_ECHO) ' MKDIR $@'
$(SILENT)mkdir -p $@
$(CONFIG_SUB_DEST): scripts FORCE
- @$(ECHO) ' WGET $@'
+ @$(CT_ECHO) ' WGET $@'
$(SILENT)wget $(wget_opt) -O $@ $(CONFIG_SUB_SRC)
$(SILENT)chmod u+rwx,go+rx-w $@
$(CONFIG_GUESS_DEST): scripts FORCE
- @$(ECHO) ' WGET $@'
+ @$(CT_ECHO) ' WGET $@'
$(SILENT)wget $(wget_opt) -O $@ $(CONFIG_GUESS_SRC)
$(SILENT)chmod u+rwx,go+rx-w $@
@@ -50,5 +50,5 @@ $(CONFIG_GUESS_DEST): scripts FORCE
# Clean up the mess
distclean::
- @$(ECHO) " CLEAN scripts"
+ @$(CT_ECHO) " CLEAN scripts"
$(SILENT)[ $(CT_TOP_DIR) = $(CT_LIB_DIR) ] || rm -rf $(CT_TOP_DIR)/scripts
diff --git a/scripts/showSamples.sh b/scripts/showSamples.sh
index 684e118..76609f2 100755
--- a/scripts/showSamples.sh
+++ b/scripts/showSamples.sh
@@ -23,10 +23,16 @@ dump_single_sample() {
[ "$1" = "-v" ] && verbose=1 && shift
[ "$1" = "-w" ] && wiki=1 && shift
local sample="$1"
+ . $(pwd)/.config.sample
case "${sample}" in
current)
sample_type="l"
sample="$( ${CT_NG} show-tuple )"
+ case "${CT_TOOLCHAIN_TYPE}" in
+ canadian)
+ sample="${CT_HOST},$sample"
+ ;;
+ esac
;;
*) if [ -f "${CT_TOP_DIR}/samples/${sample}/crosstool.config" ]; then
sample_top="${CT_TOP_DIR}"
@@ -37,7 +43,6 @@ dump_single_sample() {
fi
;;
esac
- . $(pwd)/.config.sample
if [ ${wiki} -eq 0 ]; then
width=14
printf "[%s" "${sample_type}"