scripts/mkversion: Simplify script
PATCH 1/1 scripts/mkversion: Simplify script
Simplify the script and add a line to help editors recognize this as a shell script.
--- scripts/mkversion | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
scripts/mkversion +3 -6
@@ -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
Signature · 1 line
1.7.1
Quoted 2 lines · Ramkumar Ramachandra
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
Hi,
Quoted 9 lines · Sam Ravnborg
Quoted 2 lines · Ramkumar Ramachandra
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