diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-04-19 00:16:24 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-04-23 17:45:05 +0200 |
commit | 6252040e773c30efa21c743124d5e813320a0ec2 (patch) | |
tree | 390d6ccbb10151149d5dd564f1cd200fdd825e2e | |
parent | ff3be572efde575c2b5ee621a84920ac9a5b9b8f (diff) | |
download | ffmpeg-6252040e773c30efa21c743124d5e813320a0ec2.tar.gz |
Replace `` by $() syntax in shell scripts.
$() is easier to nest and POSIX, which we require in other places.
-rwxr-xr-x | tools/clean-diff | 2 | ||||
-rwxr-xr-x | tools/patcheck | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/tools/clean-diff b/tools/clean-diff index 98e26a79f9..4600702b10 100755 --- a/tools/clean-diff +++ b/tools/clean-diff @@ -1,6 +1,6 @@ #!/bin/sh sed '/^+[^+]/!s/ /TaBBaT/g' |\ - expand -t `seq -s , 9 8 200` |\ + expand -t $(seq -s , 9 8 200) |\ sed 's/TaBBaT/ /g' |\ sed '/^+[^+]/s/ * $//' |\ tr -d '\015' |\ diff --git a/tools/patcheck b/tools/patcheck index d81a48937f..a8c0cc8cf7 100755 --- a/tools/patcheck +++ b/tools/patcheck @@ -12,7 +12,7 @@ GREP=grep EGREP=egrep TMP=patcheck.tmp OPT="-nH" -#FILES=`$GREP '^+++' $* | sed 's/+++ //g'` +#FILES=$($GREP '^+++' $* | sed 's/+++ //g') echo patCHeck 1e10.0 echo This tool is intended to help a human check/review patches it is very far from @@ -43,7 +43,7 @@ hiegrep2(){ } hiegrep '[[:space:]]$' 'trailing whitespace' $* -hiegrep "`echo x | tr 'x' '\t'`" 'tabs' $* +hiegrep "$(echo x | tr 'x' '\t')" 'tabs' $* #hiegrep ':\+$' 'Empty lines' $* hiegrep ';;' 'double ;' $* hiegrep2 '\b_[a-zA-Z0-9_]{1,}' '__(asm|attribute)([^a-zA-Z0-9]|$)' 'reserved identifer' $* @@ -106,9 +106,9 @@ hiegrep ':\+ *{ *$' '{ should be on the same line as the related previous state rm $TMP -for i in `$GREP -H '^+.*@param' $*| sed 's/^\([^:]*\):.*@param\(\[.*\]\|\) *\([a-zA-Z0-9_]*\) .*$/\1:\3/'` ; do - doxpar=`echo $i | sed 's/^.*:\(.*\)$/\1/'` - file=`echo $i | sed 's/^\([^:]*\):.*$/\1/'` +for i in $($GREP -H '^+.*@param' $*| sed 's/^\([^:]*\):.*@param\(\[.*\]\|\) *\([a-zA-Z0-9_]*\) .*$/\1:\3/') ; do + doxpar=$(echo $i | sed 's/^.*:\(.*\)$/\1/') + file=$(echo $i | sed 's/^\([^:]*\):.*$/\1/') $GREP " *$doxpar *[),]" $file | $GREP -v '@param' >/dev/null || $GREP --color=always "@param *$doxpar" $file >>$TMP done if test -e $TMP ; then @@ -121,11 +121,11 @@ cat $TMP rm $TMP for i in \ - `$EGREP -H '^\+ *'"$ERE_TYPES" $* |\ + $($EGREP -H '^\+ *'"$ERE_TYPES" $* |\ $GREP -v '(' | $EGREP -v '\Wgoto\W' |\ xargs -d '\n' -n 1 |\ $GREP -o '[* ][* ]*[a-zA-Z][0-9a-zA-Z_]* *[,;=]' |\ - sed 's/.[* ]*\([a-zA-Z][0-9a-zA-Z_]*\) *[,;=]/\1/'` \ + sed 's/.[* ]*\([a-zA-Z][0-9a-zA-Z_]*\) *[,;=]/\1/') \ ; do echo $i | $GREP '^NULL$' && continue $EGREP $i' *(\+|-|\*|/|\||&|%|)=[^=]' $* >/dev/null || echo "possibly never written:"$i >> $TMP |