* [PATCH] scripts:patch-kernel:bash syntax replace
@ 2019-10-25 7:28 Bhaskar Chowdhury
0 siblings, 0 replies; only message in thread
From: Bhaskar Chowdhury @ 2019-10-25 7:28 UTC (permalink / raw)
To: yamada.masahiro, michal.lkml
Cc: torvalds, rdunlap, linux-kbuild, linux-kernel, Bhaskar Chowdhury
This patch will replace backquote with dollar parenthesis
for better realdibility.
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@gmail.com>
---
scripts/patch-kernel | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/scripts/patch-kernel b/scripts/patch-kernel
index 033d5916797d..d864bbd67940 100755
--- a/scripts/patch-kernel
+++ b/scripts/patch-kernel
@@ -153,7 +153,7 @@ applyPatch () {
echo "failed. Clean up yourself."
return 1;
fi
- if [ "`find $sourcedir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ]
+ if [ "$(find $sourcedir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print)" ]
then
echo "Aborting. Reject files found."
return 1;
@@ -175,7 +175,7 @@ reversePatch () {
echo "failed. Clean it up."
exit 1
fi
- if [ "`find $sourcedir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print`" ]
+ if [ "$(find $sourcedir/ '(' -name '*.rej' -o -name '.*.rej' ')' -print)" ]
then
echo "Aborting. Reject files found."
return 1
@@ -189,7 +189,7 @@ reversePatch () {
# set current VERSION, PATCHLEVEL, SUBLEVEL, EXTRAVERSION
# force $TMPFILEs below to be in local directory: a slash character prevents
# the dot command from using the search path.
-TMPFILE=`mktemp ./.tmpver.XXXXXX` || { echo "cannot make temp file" ; exit 1; }
+TMPFILE=$(mktemp ./.tmpver.XXXXXX$( || { echo "cannot make temp file" ; exit 1; }
grep -E "^(VERSION|PATCHLEVEL|SUBLEVEL|EXTRAVERSION)" $sourcedir/Makefile > $TMPFILE
tr -d [:blank:] < $TMPFILE > $TMPFILE.1
. $TMPFILE.1
@@ -200,7 +200,7 @@ then
exit 1
fi
-NAME=`grep ^NAME $sourcedir/Makefile`
+NAME=$(grep ^NAME $sourcedir/Makefile)
NAME=${NAME##*=}
echo "Current kernel version is $VERSION.$PATCHLEVEL.$SUBLEVEL${EXTRAVERSION} ($NAME)"
@@ -216,8 +216,8 @@ fi
#echo "stopvers=$stopvers"
if [ $stopvers != "default" ]; then
- STOPSUBLEVEL=`echo $stopvers | cut -d. -f3`
- STOPEXTRA=`echo $stopvers | cut -d. -f4`
+ STOPSUBLEVEL=$(echo $stopvers | cut -d. -f3)
+ STOPEXTRA=$(echo $stopvers | cut -d. -f4)
STOPFULLVERSION=${stopvers%%.$STOPEXTRA}
#echo "#___STOPSUBLEVEL=/$STOPSUBLEVEL/, STOPEXTRA=/$STOPEXTRA/"
else
@@ -306,7 +306,7 @@ if [ x$gotac != x ]; then
HIGHESTPATCH=0
for PATCHNAMES in $patchdir/patch-${CURRENTFULLVERSION}-ac*\.*
do
- ACVALUE=`echo $PATCHNAMES | sed -e 's/^.*patch-[0-9.]*-ac\([0-9]*\).*/\1/'`
+ ACVALUE=$(echo $PATCHNAMES | sed -e 's/^.*patch-[0-9.]*-ac\([0-9]*\).*/\1/')
# Check it is actually a recognised patch type
findFile $patchdir/patch-${CURRENTFULLVERSION}-ac${ACVALUE} || break
--
2.20.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-25 7:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-25 7:28 [PATCH] scripts:patch-kernel:bash syntax replace Bhaskar Chowdhury
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.