Re: [PATCH 04/14] appp.sh: use the $( ... ) construct for command substitution

2014-04-28 Thread Junio C Hamano
brian m. carlson sand...@crustytoothpaste.net writes:

  CCS=`echo -e $CMT_MSG\n$HEADERS | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
  -e 's/^Signed-off-by: \(.*\)/\1,/gp'`

 It looks like you may have missed a usage here due to the line break.

Good eyes ;-)

The following may be an obvious replacement patch, but alternatively
we could just drop the whole thing (contrib/ material is not
something we would need to police strictly for the style---nobody
should be mimicking their styles as they are not part of _our_
codebase in the first place).

 contrib/thunderbird-patch-inline/appp.sh | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/contrib/thunderbird-patch-inline/appp.sh 
b/contrib/thunderbird-patch-inline/appp.sh
index 5eb4a51..1053872 100755
--- a/contrib/thunderbird-patch-inline/appp.sh
+++ b/contrib/thunderbird-patch-inline/appp.sh
@@ -10,7 +10,7 @@ CONFFILE=~/.appprc
 
 SEP=-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-
 if [ -e $CONFFILE ] ; then
-   LAST_DIR=`grep -m 1 ^LAST_DIR= ${CONFFILE}|sed -e 's/^LAST_DIR=//'`
+   LAST_DIR=$(grep -m 1 ^LAST_DIR= ${CONFFILE}|sed -e 's/^LAST_DIR=//')
cd ${LAST_DIR}
 else
cd  /dev/null
@@ -25,14 +25,14 @@ fi
 
 cd -  /dev/null
 
-SUBJECT=`sed -n -e '/^Subject: /p' ${PATCH}`
-HEADERS=`sed -e '/^'${SEP}'$/,$d' $1`
-BODY=`sed -e 1,/${SEP}/d $1`
-CMT_MSG=`sed -e '1,/^$/d' -e '/^---$/,$d' ${PATCH}`
-DIFF=`sed -e '1,/^---$/d' ${PATCH}`
+SUBJECT=$(sed -n -e '/^Subject: /p' ${PATCH})
+HEADERS=$(sed -e '/^'${SEP}'$/,$d' $1)
+BODY=$(sed -e 1,/${SEP}/d $1)
+CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' ${PATCH})
+DIFF=$(sed -e '1,/^---$/d' ${PATCH})
 
-CCS=`echo -e $CMT_MSG\n$HEADERS | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
-   -e 's/^Signed-off-by: \(.*\)/\1,/gp'`
+CCS=$(echo -e $CMT_MSG\n$HEADERS | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
+   -e 's/^Signed-off-by: \(.*\)/\1,/gp')
 
 echo $SUBJECT  $1
 echo Cc: $CCS  $1
@@ -48,7 +48,7 @@ if [ x${BODY}x != xx ] ; then
 fi
 echo $DIFF  $1
 
-LAST_DIR=`dirname ${PATCH}`
+LAST_DIR=$(dirname ${PATCH})
 
 grep -v ^LAST_DIR= ${CONFFILE}  ${CONFFILE}_
 echo LAST_DIR=${LAST_DIR}  ${CONFFILE}_
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/14] appp.sh: use the $( ... ) construct for command substitution

2014-04-28 Thread Matthieu Moy
Junio C Hamano gits...@pobox.com writes:

 brian m. carlson sand...@crustytoothpaste.net writes:

  CCS=`echo -e $CMT_MSG\n$HEADERS | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
 -e 's/^Signed-off-by: \(.*\)/\1,/gp'`

 It looks like you may have missed a usage here due to the line break.

 Good eyes ;-)

 The following may be an obvious replacement patch, but alternatively
 we could just drop the whole thing (contrib/ material is not
 something we would need to police strictly for the style---nobody
 should be mimicking their styles as they are not part of _our_
 codebase in the first place).

My vote goes for keeping the patch as it is, so that future people
grepping for `...` construct do not find any after the series is
finished.

(and because it's simple to do)

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/14] appp.sh: use the $( ... ) construct for command substitution

2014-04-28 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes:

 Junio C Hamano gits...@pobox.com writes:

 brian m. carlson sand...@crustytoothpaste.net writes:

  CCS=`echo -e $CMT_MSG\n$HEADERS | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
-e 's/^Signed-off-by: \(.*\)/\1,/gp'`

 It looks like you may have missed a usage here due to the line break.

 Good eyes ;-)

 The following may be an obvious replacement patch, but alternatively
 we could just drop the whole thing (contrib/ material is not
 something we would need to police strictly for the style---nobody
 should be mimicking their styles as they are not part of _our_
 codebase in the first place).

 My vote goes for keeping the patch as it is, so that future people
 grepping for `...` construct do not find any after the series is
 finished.

 (and because it's simple to do)

Sure, let's do that.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 04/14] appp.sh: use the $( ... ) construct for command substitution

2014-04-25 Thread brian m. carlson
On Wed, Apr 23, 2014 at 06:43:56AM -0700, Elia Pinto wrote:
 @@ -25,11 +25,11 @@ fi
  
  cd -  /dev/null
  
 -SUBJECT=`sed -n -e '/^Subject: /p' ${PATCH}`
 -HEADERS=`sed -e '/^'${SEP}'$/,$d' $1`
 -BODY=`sed -e 1,/${SEP}/d $1`
 -CMT_MSG=`sed -e '1,/^$/d' -e '/^---$/,$d' ${PATCH}`
 -DIFF=`sed -e '1,/^---$/d' ${PATCH}`
 +SUBJECT=$(sed -n -e '/^Subject: /p' ${PATCH})
 +HEADERS=$(sed -e '/^'${SEP}'$/,$d' $1)
 +BODY=$(sed -e 1,/${SEP}/d $1)
 +CMT_MSG=$(sed -e '1,/^$/d' -e '/^---$/,$d' ${PATCH})
 +DIFF=$(sed -e '1,/^---$/d' ${PATCH})
  
  CCS=`echo -e $CMT_MSG\n$HEADERS | sed -n -e 's/^Cc: \(.*\)$/\1,/gp' \
   -e 's/^Signed-off-by: \(.*\)/\1,/gp'`

It looks like you may have missed a usage here due to the line break.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187


signature.asc
Description: Digital signature