diff --git a/common/libs/func_wrt_Makefile b/common/libs/func_wrt_Makefile index 94fd9e0..943ad49 100644 --- a/common/libs/func_wrt_Makefile +++ b/common/libs/func_wrt_Makefile @@ -105,7 +105,7 @@ cat << EOF $i: $PREV @\$(call echo_message, Building) - @export SHELL=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & + @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@ @\$(PRT_DU) >>logs/\$@ EOF @@ -122,7 +122,7 @@ cat << EOF $i: $PREV @\$(call echo_message, Building) - @export SHELL=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & + @export BASHBIN=\$(SHELL) && \$(SHELL) progress_bar.sh \$@ \$\$PPID & @echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@ @\$(PRT_DU_CR) >>logs/\$@ EOF diff --git a/common/progress_bar.sh b/common/progress_bar.sh index 4fa8cb1..41926fe 100644 --- a/common/progress_bar.sh +++ b/common/progress_bar.sh @@ -24,10 +24,10 @@ declare -i SEC=0 # Seconds accumulator declare -i PREV_SEC=0 # Prevent segfault on stripping phases -if [[ "$SHELL" = "/bin/bash" ]] ; then - SLEEP=/bin/sleep -else +if [[ "$BASHBIN" = "/tools/bin/bash" ]] ; then SLEEP=/tools/bin/sleep +else + SLEEP=/bin/sleep fi write_or_exit() {