compress output of `cd' when installing templates
PATCH 1/1 compress output of `cd' when installing templates
When CDPATH is set in Bash, cd' writes new working directory to stdout, which corrupts output of tar cf - .'.
Signed-off-by Gang Chen <[email protected]>
---
Makefile | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
templates/Makefile +1 -1
@@ -44,5 +44,5 @@ clean: install: all $(INSTALL) -d -m755 $(call shellquote,$(DESTDIR)$(template_dir)) - (cd blt && $(TAR) cf - .) | \ + (cd blt > /dev/null && $(TAR) cf - .) | \ (cd $(call shellquote,$(DESTDIR)$(template_dir)) && $(TAR) xf -)
Signature · 1 line
If it makes you happy, it can't be that bad.
Quoted 2 lines · Gang Chen
When CDPATH is set in Bash,
cd' writes new working directory to stdout, which corrupts output oftar cf - .'.
Fix bash instead, or just don't export CDPATH. It is used by bash only so exporting it is unnecessary.
Signature · 1 line
http://onion.dynserv.net/~timo/
Quoted 7 lines · Timo Hirvonen
Quoted 2 lines · Gang Chen
When CDPATH is set in Bash,
cd' writes new working directory to stdout, which corrupts output oftar cf - .'.Fix bash instead, or just don't export CDPATH. It is used by bash only so exporting it is unnecessary.
Thanks.
It is not just unnecessary, but "export CDPATH" anywhere in your rc scripts is actively *WRONG*.