Skip to contentSkip to conversation

arm: socfpga: Remove bashisms from qts filter

PATCH New Marek Vasut 3 participants 6 messages Feb 11, 2016 – Feb 14, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: socfpga: Remove bashisms from qts filter

Weed out bashisms from the script. The echo -e does not work in dash, which is the default /bin/sh in debian .

Cc Dinh Nguyen <[email protected]>
Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
---
 arch/arm/mach-socfpga/qts-filter.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-socfpga/qts-filter.sh +7 -7
index 1adfbf7..050d6ba 100755
@@ -187,13 +187,13 @@ usage() {
 	echo "$0 [soc_type] [input_qts_dir] [input_bsp_dir] [output_dir]"
 	echo "Process QTS-generated headers into U-Boot compatible ones."
 	echo ""
-	echo -e "  soc_type\t-\tType of SoC, either 'cyclone5' or 'arria5'."
-	echo -e "  input_qts_dir\t-\tDirectory with compiled Quartus project"
-	echo -e "\t\t\t\tand containing the Quartus project file (QPF)."
-	echo -e "  input_bsp_dir\t-\tDirectory with generated bsp containing"
-	echo -e "\t\t\t\tthe settings.bsp file."
-	echo -e "  output_dir\t-\tDirectory to store the U-Boot compatible"
-	echo -e "\t\t\t\theaders."
+	echo "  soc_type      - Type of SoC, either 'cyclone5' or 'arria5'."
+	echo "  input_qts_dir - Directory with compiled Quartus project"
+	echo "                  and containing the Quartus project file (QPF)."
+	echo "  input_bsp_dir - Directory with generated bsp containing"
+	echo "                  the settings.bsp file."
+	echo "  output_dir    - Directory to store the U-Boot compatible"
+	echo "                  headers."
 	echo ""
 }
 
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 arm: socfpga: Remove bashisms from qts filter

Quoted 7 lines · Marek Vasut

Weed out bashisms from the script. The echo -e does not work in dash, which is the default /bin/sh in debian .

Cc Dinh Nguyen <[email protected]>
Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160211/c49dedad/attachment.sig>
#2 lore raw

PATCH 1/1 arm: socfpga: Remove bashisms from qts filter

In reply to Marek Vasut

Dear Marek Vasut,

Quoted 25 lines · In message <[email protected]> you wrote:

Weed out bashisms from the script. The echo -e does not work in dash, which is the default /bin/sh in debian .

Cc Dinh Nguyen <[email protected]>
Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
---
 arch/arm/mach-socfpga/qts-filter.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-socfpga/qts-filter.sh +0 -6
index 1adfbf7..050d6ba 100755
@@ -187,13 +187,13 @@ usage() {
 	echo "$0 [soc_type] [input_qts_dir] [input_bsp_dir] [output_dir]"
 	echo "Process QTS-generated headers into U-Boot compatible ones."
 	echo ""
-	echo -e "  soc_type\t-\tType of SoC, either 'cyclone5' or 'arria5'."
-	echo -e "  input_qts_dir\t-\tDirectory with compiled Quartus project"
-	echo -e "\t\t\t\tand containing the Quartus project file (QPF)."
-	echo -e "  input_bsp_dir\t-\tDirectory with generated bsp containing"
-	echo -e "\t\t\t\tthe settings.bsp file."
-	echo -e "  output_dir\t-\tDirectory to store the U-Boot compatible"

arch/arm/mach-socfpga/qts-filter.sh usage() { · line 198

Quoted 10 lines
arch/arm/mach-socfpga/qts-filter.sh +7 -1
-	echo -e "\t\t\t\theaders."
+	echo "  soc_type      - Type of SoC, either 'cyclone5' or 'arria5'."
+	echo "  input_qts_dir - Directory with compiled Quartus project"
+	echo "                  and containing the Quartus project file (QPF)."
+	echo "  input_bsp_dir - Directory with generated bsp containing"
+	echo "                  the settings.bsp file."
+	echo "  output_dir    - Directory to store the U-Boot compatible"
+	echo "                  headers."
 	echo ""
 }

I always wonder why people go through the efforts to write such long sequences of echo commands.

Why don't you simply use a here document? It is much easier to provide correct formatting there, too.

Best regards,

Wolfgang Denk

Signature · 7 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A good aphorism is too hard for the tooth of time, and  is  not  worn
away  by  all  the  centuries,  although  it serves as food for every
epoch.                                  - Friedrich Wilhelm Nietzsche
                          _Miscellaneous Maxims and Opinions_ no. 168
#3 lore raw

PATCH 1/1 arm: socfpga: Remove bashisms from qts filter

Quoted 42 lines · Wolfgang Denk

Dear Marek Vasut,

Quoted 25 lines · In message <[email protected]> you wrote:

Weed out bashisms from the script. The echo -e does not work in dash, which is the default /bin/sh in debian .

Cc Dinh Nguyen <[email protected]>
Cc Chin Liang See <[email protected]>
Cc Dalon Westergreen <[email protected]>
---
 arch/arm/mach-socfpga/qts-filter.sh | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/mach-socfpga/qts-filter.sh +0 -6
index 1adfbf7..050d6ba 100755
@@ -187,13 +187,13 @@ usage() {
 	echo "$0 [soc_type] [input_qts_dir] [input_bsp_dir] [output_dir]"
 	echo "Process QTS-generated headers into U-Boot compatible ones."
 	echo ""
-	echo -e "  soc_type\t-\tType of SoC, either 'cyclone5' or 'arria5'."
-	echo -e "  input_qts_dir\t-\tDirectory with compiled Quartus project"
-	echo -e "\t\t\t\tand containing the Quartus project file (QPF)."
-	echo -e "  input_bsp_dir\t-\tDirectory with generated bsp containing"
-	echo -e "\t\t\t\tthe settings.bsp file."
-	echo -e "  output_dir\t-\tDirectory to store the U-Boot compatible"

arch/arm/mach-socfpga/qts-filter.sh usage() { · line 198

Quoted 10 lines
arch/arm/mach-socfpga/qts-filter.sh +7 -1
-	echo -e "\t\t\t\theaders."
+	echo "  soc_type      - Type of SoC, either 'cyclone5' or 'arria5'."
+	echo "  input_qts_dir - Directory with compiled Quartus project"
+	echo "                  and containing the Quartus project file (QPF)."
+	echo "  input_bsp_dir - Directory with generated bsp containing"
+	echo "                  the settings.bsp file."
+	echo "  output_dir    - Directory to store the U-Boot compatible"
+	echo "                  headers."
 	echo ""
 }

I always wonder why people go through the efforts to write such long sequences of echo commands.

Quoted 2 lines

Why don't you simply use a here document? It is much easier to provide correct formatting there, too.

The original help message was some one-liner, that's why.

#4 lore raw

PATCH 1/1 arm: socfpga: Remove bashisms from qts filter

Dear Marek,

Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 6 lines

I always wonder why people go through the efforts to write such long sequences of echo commands.

Why don't you simply use a here document? It is much easier to provide correct formatting there, too.

The original help message was some one-liner, that's why.

That does not explain the issue. Of course "echo" is perfect for a single line, or two. But when someone writes 11 "echo" commands in sequence this is no longer reasonable.

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
365 Days of drinking Lo-Cal beer.                       = 1 Lite-year
#5 lore raw

PATCH 1/1 arm: socfpga: Remove bashisms from qts filter

Quoted 7 lines · Wolfgang Denk

Dear Marek,

Quoted 4 lines · In message <[email protected]> you wrote:
Quoted 4 lines

I always wonder why people go through the efforts to write such long sequences of echo commands.

Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

Why don't you simply use a here document? It is much easier to provide correct formatting there, too.

The original help message was some one-liner, that's why.

That does not explain the issue. Of course "echo" is perfect for a single line, or two. But when someone writes 11 "echo" commands in sequence this is no longer reasonable.

There was originally one or two echo commands. Someone added more arguments, so there were now more echo commands. Patches are welcome to improve that.