[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 8a7d87d 1/2: Replace 'echo -e' with 'printf',
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 8a7d87d 1/2: Replace 'echo -e' with 'printf', for portability |
Date: |
Tue, 1 Nov 2016 22:53:57 +0000 (UTC) |
branch: master
commit 8a7d87dbdfbd482d97a94e2616fef0bfd6bc8048
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Replace 'echo -e' with 'printf', for portability
---
GNUmakefile | 2 +-
install_mingw.make | 6 +++---
install_miscellanea.make | 4 ++--
install_msw.sh | 10 +++++-----
workhorse.make | 2 +-
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 0bd85fc..e00eca2 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -191,7 +191,7 @@ date:
.PHONY: release_candidate
release_candidate:
- @$(ECHO) -e \
+ @printf '%b' \
$(gpl_notices) \
'#ifndef version_hpp\n' \
'#define version_hpp\n\n' \
diff --git a/install_mingw.make b/install_mingw.make
index ca063d8..5868707 100644
--- a/install_mingw.make
+++ b/install_mingw.make
@@ -105,9 +105,9 @@ $(file_list): initial_setup
.PHONY: initial_setup
initial_setup:
- type "$(WGET)" >/dev/null || { $(ECHO) -e $(wget_missing) && false; }
- [ ! -e $(prefix) ] || { $(ECHO) -e $(prefix_exists) && false; }
- [ ! -e scratch ] || { $(ECHO) -e $(scratch_exists) && false; }
+ type "$(WGET)" >/dev/null || { printf '%b' $(wget_missing) && false; }
+ [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) && false; }
+ [ ! -e scratch ] || { printf '%b' $(scratch_exists) && false; }
$(MKDIR) --parents $(prefix)
$(RM) --force --recursive $(prefix)
$(MKDIR) --parents scratch
diff --git a/install_miscellanea.make b/install_miscellanea.make
index 6b1ab90..136afd8 100644
--- a/install_miscellanea.make
+++ b/install_miscellanea.make
@@ -238,8 +238,8 @@ $(file_list): initial_setup
.PHONY: initial_setup
initial_setup:
- @[ ! -e $(destination) ] || { $(ECHO) -e $(destination_exists) &&
false; }
- @[ ! -e scratch ] || { $(ECHO) -e $(scratch_exists) &&
false; }
+ @[ ! -e $(destination) ] || { printf '%b' $(destination_exists) &&
false; }
+ @[ ! -e scratch ] || { printf '%b' $(scratch_exists) &&
false; }
$(MKDIR) --parents $(cache_dir)
$(MKDIR) --parents $(destination)
$(MKDIR) $(third_party_bin_dir)
diff --git a/install_msw.sh b/install_msw.sh
index 7d11bf9..1da9363 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -127,14 +127,14 @@ then
restore_MinGW_mount=`mount --mount-commands 2>/dev/null | grep '"/MinGW_"'`
[ -z "$restore_MinGW_mount" ] \
- || echo $restore_MinGW_mount | grep --silent '"C:/opt/lmi/MinGW-4_9_1"' \
- || echo -e "Replacing former MinGW_ mount:\n $restore_MinGW_mount"
>/dev/tty
+ || printf $restore_MinGW_mount | grep --silent
'"C:/opt/lmi/MinGW-4_9_1"' \
+ || printf "Replacing former MinGW_ mount:\n $restore_MinGW_mount\n"
>/dev/tty
mount --force "C:/opt/lmi/MinGW-4_9_1" "/MinGW_"
restore_cache_mount=`mount --mount-commands 2>/dev/null | grep
'"/cache_for_lmi"'`
[ -z "$restore_cache_mount" ] \
- || echo $restore_cache_mount | grep --silent '"C:/cache_for_lmi"' \
- || echo -e "Replacing former cache mount:\n $restore_cache_mount"
>/dev/tty
+ || printf $restore_cache_mount | grep --silent '"C:/cache_for_lmi"' \
+ || printf "Replacing former cache mount:\n $restore_cache_mount\n"
>/dev/tty
mount --force "C:/cache_for_lmi" "/cache_for_lmi"
fi
@@ -185,7 +185,7 @@ then
for z in /opt/lmi/bin/*; \
do cmd /c $CYGCHECK $z 2>&1 | grep --silent cygwin \
- && echo -e "\ncygcheck $z" && cmd /c $CYGCHECK $z; \
+ && printf "\ncygcheck $z\n" && cmd /c $CYGCHECK $z; \
done
fi
diff --git a/workhorse.make b/workhorse.make
index 6df5a23..c091373 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -1130,7 +1130,7 @@ run_unit_tests: unit_tests_not_built $(addsuffix
-run,$(unit_test_targets))
.PHONY: %$(EXEEXT)-run
%$(EXEEXT)-run:
- @$(ECHO) -e "\nRunning $*:"
+ @printf "\nRunning $*:\n"
@-$(PERFORM) ./$* --accept
################################################################################