* [PATCH] scripts/mkversion: Simplify script
@ 2010-08-18 21:12 Ramkumar Ramachandra
2010-08-19 0:20 ` Sam Ravnborg
0 siblings, 1 reply; 3+ messages in thread
From: Ramkumar Ramachandra @ 2010-08-18 21:12 UTC (permalink / raw)
To: linux-kernel; +Cc: Michal Marek, linux-kbuild
Simplify the script and add a line to help editors recognize this as a
shell script.
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Michal Marek <mmarek@suse.cz>
---
scripts/mkversion | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/scripts/mkversion b/scripts/mkversion
index c12addc..6fedcb3 100644
--- a/scripts/mkversion
+++ b/scripts/mkversion
@@ -1,6 +1,3 @@
-if [ ! -f .version ]
-then
- echo 1
-else
- expr 0`cat .version` + 1
-fi
+#!/bin/sh
+
+[ ! -f .version ] && echo 1 || expr 0`cat .version` + 1
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/mkversion: Simplify script
2010-08-18 21:12 [PATCH] scripts/mkversion: Simplify script Ramkumar Ramachandra
@ 2010-08-19 0:20 ` Sam Ravnborg
2010-08-19 2:56 ` Ramkumar Ramachandra
0 siblings, 1 reply; 3+ messages in thread
From: Sam Ravnborg @ 2010-08-19 0:20 UTC (permalink / raw)
To: Ramkumar Ramachandra; +Cc: linux-kernel, Michal Marek, linux-kbuild
On Thu, Aug 19, 2010 at 02:42:25AM +0530, Ramkumar Ramachandra wrote:
> Simplify the script and add a line to help editors recognize this as a
> shell script.
This does not IMO simplify the script.
The original version is simple to follow for the usual C coder.
The new version is harder to follow.
Adding the bangshee (#!/bin/sh) is fine.
Sam
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scripts/mkversion: Simplify script
2010-08-19 0:20 ` Sam Ravnborg
@ 2010-08-19 2:56 ` Ramkumar Ramachandra
0 siblings, 0 replies; 3+ messages in thread
From: Ramkumar Ramachandra @ 2010-08-19 2:56 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kernel, Michal Marek, linux-kbuild
Hi,
Sam Ravnborg writes:
> On Thu, Aug 19, 2010 at 02:42:25AM +0530, Ramkumar Ramachandra wrote:
> > Simplify the script and add a line to help editors recognize this as a
> > shell script.
>
> This does not IMO simplify the script.
> The original version is simple to follow for the usual C coder.
> The new version is harder to follow.
>
> Adding the bangshee (#!/bin/sh) is fine.
Okay, we can drop the patch.
I'll pick up some other janiorial tasks to get into the hang of
writing patches.
-- Ram
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-19 11:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-18 21:12 [PATCH] scripts/mkversion: Simplify script Ramkumar Ramachandra
2010-08-19 0:20 ` Sam Ravnborg
2010-08-19 2:56 ` Ramkumar Ramachandra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox