All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: remove spaces from shell variable assignment
@ 2019-03-21  1:37 Tom Levy
  2019-03-21 13:36 ` Jani Nikula
  2019-03-25 15:53 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: Tom Levy @ 2019-03-21  1:37 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, Trivial Patch Monkey, Tom Levy

The instructions for generating patches are given as shell commands
with variables as placeholders. They use the syntax "SRCTREE= linux",
which is wrong for the Bourne shell family (it runs the command
"linux" with the variable "SRCTREE" set to the empty string).

Remove the spaces to avoid confusion. This breaks the pretty alignment
but helps new contributors who try to run the commands as written.

Signed-off-by: Tom Levy <tomlevy93@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/process/submitting-patches.rst                    | 6 +++---
 Documentation/translations/it_IT/process/submitting-patches.rst | 6 +++---
 Documentation/translations/ja_JP/SubmittingPatches              | 6 +++---
 Documentation/translations/zh_CN/SubmittingPatches              | 6 +++---
 4 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
index be7d1829c3af..33098adc5381 100644
--- a/Documentation/process/submitting-patches.rst
+++ b/Documentation/process/submitting-patches.rst
@@ -60,8 +60,8 @@ not in any lower subdirectory.
 
 To create a patch for a single file, it is often sufficient to do::
 
-	SRCTREE= linux
-	MYFILE=  drivers/net/mydriver.c
+	SRCTREE=linux
+	MYFILE=drivers/net/mydriver.c
 
 	cd $SRCTREE
 	cp $MYFILE $MYFILE.orig
@@ -73,7 +73,7 @@ To create a patch for multiple files, you should unpack a "vanilla",
 or unmodified kernel source tree, and generate a ``diff`` against your
 own source tree.  For example::
 
-	MYSRC= /devel/linux
+	MYSRC=/devel/linux
 
 	tar xvfz linux-3.19.tar.gz
 	mv linux-3.19 linux-3.19-vanilla
diff --git a/Documentation/translations/it_IT/process/submitting-patches.rst b/Documentation/translations/it_IT/process/submitting-patches.rst
index 2ab9c1401aa1..713fba075b9d 100644
--- a/Documentation/translations/it_IT/process/submitting-patches.rst
+++ b/Documentation/translations/it_IT/process/submitting-patches.rst
@@ -67,8 +67,8 @@ sulla radice dei sorgenti del kernel, e non sulle sue sottocartelle.
 
 Per creare una patch per un singolo file, spesso è sufficiente fare::
 
-	SRCTREE= linux
-	MYFILE=  drivers/net/mydriver.c
+	SRCTREE=linux
+	MYFILE=drivers/net/mydriver.c
 
 	cd $SRCTREE
 	cp $MYFILE $MYFILE.orig
@@ -80,7 +80,7 @@ Per creare una patch per molteplici file, dovreste spacchettare i sorgenti
 "vergini", o comunque non modificati, e fare un ``diff`` coi vostri.
 Per esempio::
 
-	MYSRC= /devel/linux
+	MYSRC=/devel/linux
 
 	tar xvfz linux-3.19.tar.gz
 	mv linux-3.19 linux-3.19-vanilla
diff --git a/Documentation/translations/ja_JP/SubmittingPatches b/Documentation/translations/ja_JP/SubmittingPatches
index 02139656463e..ad979c3c06a6 100644
--- a/Documentation/translations/ja_JP/SubmittingPatches
+++ b/Documentation/translations/ja_JP/SubmittingPatches
@@ -58,8 +58,8 @@ Linux カーネルに対する全ての変更は diff(1) コマンドによる
 1個のファイルについてのパッチを作成するためには、ほとんどの場合、
 以下の作業を行えば十分です。
 
-	SRCTREE= linux-2.6
-	MYFILE=  drivers/net/mydriver.c
+	SRCTREE=linux-2.6
+	MYFILE=drivers/net/mydriver.c
 
 	cd $SRCTREE
 	cp $MYFILE $MYFILE.orig
@@ -71,7 +71,7 @@ Linux カーネルに対する全ての変更は diff(1) コマンドによる
 なわち変更を加えてない Linux カーネルを展開し、自分の Linux カーネル
 ソースとの差分を生成しないといけません。例えば、
 
-	MYSRC= /devel/linux-2.6
+	MYSRC=/devel/linux-2.6
 
 	tar xvfz linux-2.6.12.tar.gz
 	mv linux-2.6.12 linux-2.6.12-vanilla
diff --git a/Documentation/translations/zh_CN/SubmittingPatches b/Documentation/translations/zh_CN/SubmittingPatches
index e9098da8f1a4..04d9a1f89b58 100644
--- a/Documentation/translations/zh_CN/SubmittingPatches
+++ b/Documentation/translations/zh_CN/SubmittingPatches
@@ -51,8 +51,8 @@ Documentation/process/submitting-drivers.rst 。
 何子目录。
 为一个单独的文件创建补丁,一般来说这样做就够了:
 
-        SRCTREE= linux-2.6
-        MYFILE=  drivers/net/mydriver.c
+        SRCTREE=linux-2.6
+        MYFILE=drivers/net/mydriver.c
 
         cd $SRCTREE
         cp $MYFILE $MYFILE.orig
@@ -63,7 +63,7 @@ Documentation/process/submitting-drivers.rst 。
 为多个文件创建补丁,你可以解开一个没有修改过的内核源代码树,然后和你自
 己的代码树之间做 diff 。例如:
 
-        MYSRC= /devel/linux-2.6
+        MYSRC=/devel/linux-2.6
 
         tar xvfz linux-2.6.12.tar.gz
         mv linux-2.6.12 linux-2.6.12-vanilla
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: remove spaces from shell variable assignment
  2019-03-21  1:37 [PATCH] docs: remove spaces from shell variable assignment Tom Levy
@ 2019-03-21 13:36 ` Jani Nikula
  2019-03-25 15:53 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2019-03-21 13:36 UTC (permalink / raw)
  To: Tom Levy, Jonathan Corbet; +Cc: linux-doc, Trivial Patch Monkey, Tom Levy

On Thu, 21 Mar 2019, Tom Levy <tomlevy93@gmail.com> wrote:
> The instructions for generating patches are given as shell commands
> with variables as placeholders. They use the syntax "SRCTREE= linux",
> which is wrong for the Bourne shell family (it runs the command
> "linux" with the variable "SRCTREE" set to the empty string).
>
> Remove the spaces to avoid confusion. This breaks the pretty alignment
> but helps new contributors who try to run the commands as written.

The change looks fine.

Note that new contributors should *never* follow this section anyway. In
fact, I think *nobody* should follow this section...

BR,
Jani.


>
> Signed-off-by: Tom Levy <tomlevy93@gmail.com>
> Cc: Jonathan Corbet <corbet@lwn.net>
> ---
>  Documentation/process/submitting-patches.rst                    | 6 +++---
>  Documentation/translations/it_IT/process/submitting-patches.rst | 6 +++---
>  Documentation/translations/ja_JP/SubmittingPatches              | 6 +++---
>  Documentation/translations/zh_CN/SubmittingPatches              | 6 +++---
>  4 files changed, 12 insertions(+), 12 deletions(-)
>
> diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
> index be7d1829c3af..33098adc5381 100644
> --- a/Documentation/process/submitting-patches.rst
> +++ b/Documentation/process/submitting-patches.rst
> @@ -60,8 +60,8 @@ not in any lower subdirectory.
>  
>  To create a patch for a single file, it is often sufficient to do::
>  
> -	SRCTREE= linux
> -	MYFILE=  drivers/net/mydriver.c
> +	SRCTREE=linux
> +	MYFILE=drivers/net/mydriver.c
>  
>  	cd $SRCTREE
>  	cp $MYFILE $MYFILE.orig
> @@ -73,7 +73,7 @@ To create a patch for multiple files, you should unpack a "vanilla",
>  or unmodified kernel source tree, and generate a ``diff`` against your
>  own source tree.  For example::
>  
> -	MYSRC= /devel/linux
> +	MYSRC=/devel/linux
>  
>  	tar xvfz linux-3.19.tar.gz
>  	mv linux-3.19 linux-3.19-vanilla
> diff --git a/Documentation/translations/it_IT/process/submitting-patches.rst b/Documentation/translations/it_IT/process/submitting-patches.rst
> index 2ab9c1401aa1..713fba075b9d 100644
> --- a/Documentation/translations/it_IT/process/submitting-patches.rst
> +++ b/Documentation/translations/it_IT/process/submitting-patches.rst
> @@ -67,8 +67,8 @@ sulla radice dei sorgenti del kernel, e non sulle sue sottocartelle.
>  
>  Per creare una patch per un singolo file, spesso è sufficiente fare::
>  
> -	SRCTREE= linux
> -	MYFILE=  drivers/net/mydriver.c
> +	SRCTREE=linux
> +	MYFILE=drivers/net/mydriver.c
>  
>  	cd $SRCTREE
>  	cp $MYFILE $MYFILE.orig
> @@ -80,7 +80,7 @@ Per creare una patch per molteplici file, dovreste spacchettare i sorgenti
>  "vergini", o comunque non modificati, e fare un ``diff`` coi vostri.
>  Per esempio::
>  
> -	MYSRC= /devel/linux
> +	MYSRC=/devel/linux
>  
>  	tar xvfz linux-3.19.tar.gz
>  	mv linux-3.19 linux-3.19-vanilla
> diff --git a/Documentation/translations/ja_JP/SubmittingPatches b/Documentation/translations/ja_JP/SubmittingPatches
> index 02139656463e..ad979c3c06a6 100644
> --- a/Documentation/translations/ja_JP/SubmittingPatches
> +++ b/Documentation/translations/ja_JP/SubmittingPatches
> @@ -58,8 +58,8 @@ Linux カーネルに対する全ての変更は diff(1) コマンドによる
>  1個のファイルについてのパッチを作成するためには、ほとんどの場合、
>  以下の作業を行えば十分です。
>  
> -	SRCTREE= linux-2.6
> -	MYFILE=  drivers/net/mydriver.c
> +	SRCTREE=linux-2.6
> +	MYFILE=drivers/net/mydriver.c
>  
>  	cd $SRCTREE
>  	cp $MYFILE $MYFILE.orig
> @@ -71,7 +71,7 @@ Linux カーネルに対する全ての変更は diff(1) コマンドによる
>  なわち変更を加えてない Linux カーネルを展開し、自分の Linux カーネル
>  ソースとの差分を生成しないといけません。例えば、
>  
> -	MYSRC= /devel/linux-2.6
> +	MYSRC=/devel/linux-2.6
>  
>  	tar xvfz linux-2.6.12.tar.gz
>  	mv linux-2.6.12 linux-2.6.12-vanilla
> diff --git a/Documentation/translations/zh_CN/SubmittingPatches b/Documentation/translations/zh_CN/SubmittingPatches
> index e9098da8f1a4..04d9a1f89b58 100644
> --- a/Documentation/translations/zh_CN/SubmittingPatches
> +++ b/Documentation/translations/zh_CN/SubmittingPatches
> @@ -51,8 +51,8 @@ Documentation/process/submitting-drivers.rst 。
>  何子目录。
>  为一个单独的文件创建补丁,一般来说这样做就够了:
>  
> -        SRCTREE= linux-2.6
> -        MYFILE=  drivers/net/mydriver.c
> +        SRCTREE=linux-2.6
> +        MYFILE=drivers/net/mydriver.c
>  
>          cd $SRCTREE
>          cp $MYFILE $MYFILE.orig
> @@ -63,7 +63,7 @@ Documentation/process/submitting-drivers.rst 。
>  为多个文件创建补丁,你可以解开一个没有修改过的内核源代码树,然后和你自
>  己的代码树之间做 diff 。例如:
>  
> -        MYSRC= /devel/linux-2.6
> +        MYSRC=/devel/linux-2.6
>  
>          tar xvfz linux-2.6.12.tar.gz
>          mv linux-2.6.12 linux-2.6.12-vanilla

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: remove spaces from shell variable assignment
  2019-03-21  1:37 [PATCH] docs: remove spaces from shell variable assignment Tom Levy
  2019-03-21 13:36 ` Jani Nikula
@ 2019-03-25 15:53 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2019-03-25 15:53 UTC (permalink / raw)
  To: Tom Levy; +Cc: linux-doc, Trivial Patch Monkey

On Thu, 21 Mar 2019 14:37:56 +1300
Tom Levy <tomlevy93@gmail.com> wrote:

> The instructions for generating patches are given as shell commands
> with variables as placeholders. They use the syntax "SRCTREE= linux",
> which is wrong for the Bourne shell family (it runs the command
> "linux" with the variable "SRCTREE" set to the empty string).
> 
> Remove the spaces to avoid confusion. This breaks the pretty alignment
> but helps new contributors who try to run the commands as written.
> 
> Signed-off-by: Tom Levy <tomlevy93@gmail.com>
> Cc: Jonathan Corbet <corbet@lwn.net>

Applied, thanks.  Though I agree with Jani that this advice is looking a
little dated in general...

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-03-25 15:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21  1:37 [PATCH] docs: remove spaces from shell variable assignment Tom Levy
2019-03-21 13:36 ` Jani Nikula
2019-03-25 15:53 ` Jonathan Corbet

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.