[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gsrc-commit] /srv/bzr/gsrc/trunk r2248: change echo -e to printf for po
From: |
Brandon Invergo |
Subject: |
[Gsrc-commit] /srv/bzr/gsrc/trunk r2248: change echo -e to printf for portability |
Date: |
Mon, 01 Apr 2013 22:43:25 +0200 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 2248
committer: Brandon Invergo <address@hidden>
branch nick: trunk
timestamp: Mon 2013-04-01 22:43:25 +0200
message:
change echo -e to printf for portability
modified:
gar.mk
=== modified file 'gar.mk'
--- a/gar.mk 2013-04-01 19:37:15 +0000
+++ b/gar.mk 2013-04-01 20:43:25 +0000
@@ -130,50 +130,50 @@
# what just happened when all the dependencies are finished.
pkg-info:
- @echo -e "$(MSG)Name:$(OFF) $(NAME)"
- @echo -e "$(MSG)Version:$(OFF) $(GARVERSION)$(if
$(PATCHNUM),-$(PATCHNUM))"
- @echo -e "$(MSG)URL:$(OFF) $(HOME_URL)"
- @echo -e "$(MSG)Description:$(OFF)"
- @echo -e '$(if $(BLURB),$(subst $(newline),\n,$(BLURB)),
$(DESCRIPTION))'
+ @printf "$(MSG)Name:$(OFF) $(NAME)\n"
+ @printf "$(MSG)Version:$(OFF) $(GARVERSION)$(if
$(PATCHNUM),-$(PATCHNUM))\n"
+ @printf "$(MSG)URL:$(OFF) $(HOME_URL)\n"
+ @printf "$(MSG)Description:$(OFF)\n"
+ @printf '$(if $(BLURB),$(subst $(newline),\n,$(BLURB)),
$(DESCRIPTION))\n'
@($(MAKE) install-p >/dev/null 2>/dev/null && \
- echo -e "$(MSG)Status$(OFF): installed (stowed)") || \
+ printf "$(MSG)Status$(OFF): installed (stowed)\n") || \
($(MAKE) reinstall-p >/dev/null 2>/dev/null && \
- echo -e "$(MSG)Status:$(OFF) installed (not
stowed)") || \
- echo -e "$(MSG)Status:$(OFF) not installed"
+ printf "$(MSG)Status:$(OFF) installed (not
stowed)\n") || \
+ printf "$(MSG)Status:$(OFF) not installed\n"
pkg-info-curt:
- @echo -e "$(OK)$(lastword $(subst /, ,$(dir $(shell
pwd))))/$(MSG2)$(GARNAME) $(OFF)$(GARVERSION)"
- @echo -e " $(DESCRIPTION)"
+ @printf "$(OK)$(lastword $(subst /, ,$(dir $(shell
pwd))))/$(MSG2)$(GARNAME) $(OFF)$(GARVERSION)"
+ @printf " $(DESCRIPTION)"
# pkg-rec: generate GNU Recutils-friendly package listings. In other words,
this
# output is more easily machine-readable than that of pkg-info
pkg-rec:
- @echo "Garname: $(GARNAME)"
- @echo "Name: $(NAME)"
- @echo "Upstream_name: $(UPSTREAMNAME)"
- @echo "Version: $(GARVERSION)"
- @echo "Home_URL: $(HOME_URL)"
- @echo "Download_URL: $(firstword $(MASTER_SITES))$(MASTER_SUBDIR)"
- @echo "Description: $(DESCRIPTION)"
- @echo -e "Blurb: $(subst $(newline),\n+ ,$(BLURB))"
- @for i in $(BUILDDEPS); do echo "Build_dep: $$i"; done
- @for i in $(LIBDEPS); do echo "Lib_dep: $$i"; done
- @for i in $(TESTDEPS); do echo "Test_dep: $$i"; done
+ @printf "Garname: $(GARNAME)\n"
+ @printf "Name: $(NAME)\n"
+ @printf "Upstream_name: $(UPSTREAMNAME)\n"
+ @printf "Version: $(GARVERSION)\n"
+ @printf "Home_URL: $(HOME_URL)\n"
+ @printf "Download_URL: $(firstword $(MASTER_SITES))$(MASTER_SUBDIR)\n"
+ @printf "Description: $(DESCRIPTION)\n"
+ @printf 'Blurb: $(subst $(newline),\n+ ,$(BLURB))\n'
+ @for i in $(BUILDDEPS); do printf "Build_dep: $$i\n"; done
+ @for i in $(LIBDEPS); do printf "Lib_dep: $$i\n"; done
+ @for i in $(TESTDEPS); do printf "Test_dep: $$i\n"; done
# fetch-list - Show list of files that would be retrieved by fetch.
# NOTE: DOES NOT RUN pre-everything!
fetch-list:
- @echo -e "$(MSG)Name:$(OFF) $(GARNAME)"
- @echo -e "$(MSG)Version:$(OFF) $(GARVERSION)"
- @echo -e "$(MSG)Location:$(OFF) $(firstword
$(MASTER_SITES))$(MASTER_SUBDIR)"
- @echo -e "$(MSG)Distribution files:$(OFF) "
- @for i in $(DISTFILES); do echo " $$i"; done
- @echo -e "$(MSG)Patch files:$(OFF) "
- @for i in $(PATCHFILES); do echo " $$i"; done
- @echo -e "$(MSG)Signature files:$(OFF) "
- @for i in $(SIGFILES); do echo " $$i"; done
- @echo -e "$(MSG)Dependencies:$(OFF) "
- @for i in $(LIBDEPS) $(BUILDDEPS) $(if $(USE_TESTS),$(TESTDEPS),) ; do
echo " $$i"; done
+ @printf "$(MSG)Name:$(OFF) $(GARNAME)\n"
+ @printf "$(MSG)Version:$(OFF) $(GARVERSION)\n"
+ @printf "$(MSG)Location:$(OFF) $(firstword
$(MASTER_SITES))$(MASTER_SUBDIR)\n"
+ @printf "$(MSG)Distribution files:$(OFF)\n"
+ @for i in $(DISTFILES); do printf " $$i\n"; done
+ @printf "$(MSG)Patch files:$(OFF)\n"
+ @for i in $(PATCHFILES); do printf " $$i\n"; done
+ @printf "$(MSG)Signature files:$(OFF)\n"
+ @for i in $(SIGFILES); do printf " $$i\n"; done
+ @printf "$(MSG)Dependencies:$(OFF) \n"
+ @for i in $(LIBDEPS) $(BUILDDEPS) $(if $(USE_TESTS),$(TESTDEPS),) ; do
printf " $$i\n"; done
# fetch - Retrieves $(DISTFILES) (and $(PATCHFILES) if
defined)
# into $(DOWNLOADDIR) as necessary.
@@ -302,11 +302,11 @@
install-p:
@test -h $(dotgardir)/VERSION && \
test "`readlink $(dotgardir)/VERSION`" = $(PACKAGENAME) && \
- echo -e "[$(OK)install-p$(OFF)] $(MSG)$(PACKAGENAME) is
installed$(OFF)"
+ printf "[$(OK)install-p$(OFF)] $(MSG)$(PACKAGENAME) is
installed$(OFF)\n"
reinstall-p:
@test -d $(packagesdir)/$(PACKAGENAME) && \
- echo -e "[$(OK)reinstall-p$(OFF)] $(MSG)$(PACKAGENAME) is
available to be reinstalled$(OFF)"
+ printf "[$(OK)reinstall-p$(OFF)] $(MSG)$(PACKAGENAME) is
available to be reinstalled$(OFF)\n"
reinstall: $(addprefix dep-$(GARDIR)/,$(LIBDEPS)) $(addprefix
sysinstall-,$(filter-out $(SYSINSTALL_IGNORE),$(SYSINSTALL_TARGETS)))
@@ -360,7 +360,7 @@
# file after a successful checksum (or just remove the checksum
# cookie, but that would be lame and unportable).
clean:
- @echo -e "[$(OK)clean$(OFF)] $(MSG)Removing working files and
directories$(OFF)"
+ @printf "[$(OK)clean$(OFF)] $(MSG)Removing working files and
directories$(OFF)\n"
@rm -rf $(DOWNLOADDIR) $(COOKIEDIR) $(LOGDIR) $(WORKSRC) $(WORKDIR)
$(EXTRACTDIR) $(SCRATCHDIR) $(SCRATCHDIR)-$(COOKIEDIR) *~
# these targets do not have actual corresponding files
@@ -372,9 +372,9 @@
test-logs:
@for f in `find . -name 'test*.log'` ; do \
- echo -e "$(MSG)===> test log start: $$f <===$(OFF)" ; \
+ printf "$(MSG)===> test log start: $$f <===$(OFF)\n" ; \
cat $$f ; \
- echo -e "$(MSG)===> test log end: $$f <===\n$(OFF)" ; \
+ printf "$(MSG)===> test log end: $$f <===\n$(OFF)\n" ; \
done
.PHONY: $(addsuffix fetch checksum extract patch configure build test
install,-log)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gsrc-commit] /srv/bzr/gsrc/trunk r2248: change echo -e to printf for portability,
Brandon Invergo <=