Use $() instead of ticks

This commit is contained in:
Frédéric Mahé 2014-01-18 16:33:05 +01:00 committed by Olivier Mengué
parent 83a2215163
commit df26c49ff9

View File

@ -955,12 +955,12 @@ _lp_fossil_branch_color()
MINUSLINE=$(fossil diff | egrep -c '^-[^-].+$') MINUSLINE=$(fossil diff | egrep -c '^-[^-].+$')
ret="" ret=""
C2AA=`fossil changes | grep -c "ADDED"` C2AA=$(fossil changes | grep -c "ADDED")
if [[ $C2AA -gt 0 ]] ; then if [[ $C2AA -gt 0 ]] ; then
# We count the line "à la" git # We count the line "à la" git
local ADDFILE local ADDFILE
local FILE local FILE
ADDFILE=`fossil changes | grep ADDED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2` ADDFILE=$(fossil changes | grep ADDED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2)
for FILE in $ADDFILE ; do for FILE in $ADDFILE ; do
PLULI=$(wc -l < $FILE) PLULI=$(wc -l < $FILE)
let PLUSLINE=$PLUSLINE+$PLULI let PLUSLINE=$PLUSLINE+$PLULI
@ -971,12 +971,12 @@ _lp_fossil_branch_color()
ret+="+$PLUSLINE" ret+="+$PLUSLINE"
fi fi
C2D=`fossil changes | grep -c "DELETED"` C2D=$(fossil changes | grep -c "DELETED")
if [[ $C2D -gt 0 ]] ; then if [[ $C2D -gt 0 ]] ; then
# We count the line "à la" git # We count the line "à la" git
local DELFILE local DELFILE
local FILE local FILE
DELFILE=`fossil changes | grep DELETED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2` DELFILE=$(fossil changes | grep DELETED | sed -e 's/\s\{2,\}/ /g' | cut -d" " -f2)
for FILE in $DELFILE ; do for FILE in $DELFILE ; do
MINLI=$(wc -l < $FILE) MINLI=$(wc -l < $FILE)
let MINUSLINE=$MINUSLINE+$MINLI let MINUSLINE=$MINUSLINE+$MINLI