scripts: Use $(..) instead of deprecated ..
This fixes these warnings from shellcheck: ^-- SC2006: Use $(..) instead of deprecated `..` Update also a comment using the same pattern. Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
parent
8913885761
commit
bbd908025c
|
@ -39,7 +39,7 @@
|
||||||
# However some caution is required regarding files that might be part
|
# However some caution is required regarding files that might be part
|
||||||
# of the guest agent or standalone tests.
|
# of the guest agent or standalone tests.
|
||||||
|
|
||||||
# for i in `git ls-tree --name-only HEAD` ; do test -f $i && \
|
# for i in $(git ls-tree --name-only HEAD) ; do test -f $i && \
|
||||||
# grep -E '^# *include' $i | head -1 | grep 'osdep.h' ; test $? != 0 && \
|
# grep -E '^# *include' $i | head -1 | grep 'osdep.h' ; test $? != 0 && \
|
||||||
# echo $i ; done
|
# echo $i ; done
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ case $line in
|
||||||
qemu_*dir=*) # qemu-specific directory configuration
|
qemu_*dir=*) # qemu-specific directory configuration
|
||||||
name=${line%=*}
|
name=${line%=*}
|
||||||
value=${line#*=}
|
value=${line#*=}
|
||||||
define_name=`echo $name | LC_ALL=C tr '[a-z]' '[A-Z]'`
|
define_name=$(echo $name | LC_ALL=C tr '[a-z]' '[A-Z]')
|
||||||
eval "define_value=\"$value\""
|
eval "define_value=\"$value\""
|
||||||
echo "#define CONFIG_$define_name \"$define_value\""
|
echo "#define CONFIG_$define_name \"$define_value\""
|
||||||
# save for the next definitions
|
# save for the next definitions
|
||||||
|
@ -72,7 +72,7 @@ case $line in
|
||||||
;;
|
;;
|
||||||
ARCH=*) # configuration
|
ARCH=*) # configuration
|
||||||
arch=${line#*=}
|
arch=${line#*=}
|
||||||
arch_name=`echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
|
arch_name=$(echo $arch | LC_ALL=C tr '[a-z]' '[A-Z]')
|
||||||
echo "#define HOST_$arch_name 1"
|
echo "#define HOST_$arch_name 1"
|
||||||
;;
|
;;
|
||||||
HOST_USB=*)
|
HOST_USB=*)
|
||||||
|
@ -92,7 +92,7 @@ case $line in
|
||||||
;;
|
;;
|
||||||
TARGET_BASE_ARCH=*) # configuration
|
TARGET_BASE_ARCH=*) # configuration
|
||||||
target_base_arch=${line#*=}
|
target_base_arch=${line#*=}
|
||||||
base_arch_name=`echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]'`
|
base_arch_name=$(echo $target_base_arch | LC_ALL=C tr '[a-z]' '[A-Z]')
|
||||||
echo "#define TARGET_$base_arch_name 1"
|
echo "#define TARGET_$base_arch_name 1"
|
||||||
;;
|
;;
|
||||||
TARGET_XML_FILES=*)
|
TARGET_XML_FILES=*)
|
||||||
|
|
|
@ -33,7 +33,7 @@ if test -e "$output"; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for input; do
|
for input; do
|
||||||
arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`
|
arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g')
|
||||||
|
|
||||||
${AWK:-awk} 'BEGIN { n = 0
|
${AWK:-awk} 'BEGIN { n = 0
|
||||||
printf "#include \"qemu/osdep.h\"\n"
|
printf "#include \"qemu/osdep.h\"\n"
|
||||||
|
@ -67,8 +67,8 @@ echo >> $output
|
||||||
echo "const char *const xml_builtin[][2] = {" >> $output
|
echo "const char *const xml_builtin[][2] = {" >> $output
|
||||||
|
|
||||||
for input; do
|
for input; do
|
||||||
basename=`echo $input | sed 's,.*/,,'`
|
basename=$(echo $input | sed 's,.*/,,')
|
||||||
arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`
|
arrayname=xml_feature_$(echo $input | sed 's,.*/,,; s/[-.]/_/g')
|
||||||
echo " { \"$basename\", $arrayname }," >> $output
|
echo " { \"$basename\", $arrayname }," >> $output
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
src=$1
|
src=$1
|
||||||
dep=$2
|
dep=$2
|
||||||
target=$3
|
target=$3
|
||||||
src_dir=`dirname $src`
|
src_dir=$(dirname $src)
|
||||||
all_includes=
|
all_includes=
|
||||||
|
|
||||||
process_includes () {
|
process_includes () {
|
||||||
|
@ -20,7 +20,7 @@ process_includes () {
|
||||||
|
|
||||||
f=$src
|
f=$src
|
||||||
while [ -n "$f" ] ; do
|
while [ -n "$f" ] ; do
|
||||||
f=`cat $f | tr -d '\r' | awk '/^include / {printf "'$src_dir'/%s ", $2}'`
|
f=$(cat $f | tr -d '\r' | awk '/^include / {printf "'$src_dir'/%s ", $2}')
|
||||||
[ $? = 0 ] || exit 1
|
[ $? = 0 ] || exit 1
|
||||||
all_includes="$all_includes $f"
|
all_includes="$all_includes $f"
|
||||||
done
|
done
|
||||||
|
|
|
@ -10,7 +10,7 @@ if [ ! -f /proc/sys/fs/binfmt_misc/register ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# probe cpu type
|
# probe cpu type
|
||||||
cpu=`uname -m`
|
cpu=$(uname -m)
|
||||||
case "$cpu" in
|
case "$cpu" in
|
||||||
i386|i486|i586|i686|i86pc|BePC|x86_64)
|
i386|i486|i586|i686|i86pc|BePC|x86_64)
|
||||||
cpu="i386"
|
cpu="i386"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
# This work is licensed under the terms of the GNU GPL version 2.
|
# This work is licensed under the terms of the GNU GPL version 2.
|
||||||
# See the COPYING file in the top-level directory.
|
# See the COPYING file in the top-level directory.
|
||||||
|
|
||||||
tmpdir=`mktemp -d`
|
tmpdir=$(mktemp -d)
|
||||||
linux="$1"
|
linux="$1"
|
||||||
output="$2"
|
output="$2"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue