@@ -30,7 +30,7 @@ download_header()
3030 local header=$1
3131 local path=$2
3232
33- local url=" ${ base_url}${ header} ?h=${ version} "
33+ local url=" $base_url$ header ?h=$version "
3434
3535 if ! curl -s -f --create-dirs -o $path $url ; then
3636 echo " Failed to download $url "
@@ -61,12 +61,12 @@ import_header()
6161 local import
6262 local header=$1
6363
64- local path=" ${ base_path}${ header} "
64+ local path=" $base_path$ header "
6565
6666 download_header $header $path || return 1
6767
6868 for include in $( sed -ne ' s/^#include <\(.*\)>$/\1/p' $path ) ; do
69- if [ ! -f " ${ base_path}${ include} " ]; then
69+ if [ ! -f " $base_path$ include " ]; then
7070 read -p " Import $include (y/n): " import && [ " $import " = ' y' ] || continue
7171 echo " Importing $include for $path "
7272 import_header " $include " || return 1
@@ -85,8 +85,8 @@ fixup_includes()
8585
8686 # Prepend include path with "uapi/" if the header is imported
8787 for include in $( sed -ne ' s/^#include <\(.*\)>$/\1/p' $path ) ; do
88- if [ -f " ${ base_path}${ include} " ]; then
89- sed -i " s|${ include} |uapi/${ include} |g" $path
88+ if [ -f " $base_path$ include " ]; then
89+ sed -i " s|$include |uapi/$include |g" $path
9090 fi
9191 done
9292}
@@ -106,7 +106,7 @@ check_header() {
106106}
107107
108108while getopts i:u:ch opt ; do
109- case ${ opt} in
109+ case $opt in
110110 i ) file=$OPTARG ;;
111111 u ) version=$OPTARG ;;
112112 c ) check_headers=1 ;;
123123
124124cd $( dirname $0 ) /..
125125
126- current_version=$( < ${ base_path} /version)
126+ current_version=$( < $base_path /version)
127127
128- if [ -n " ${ version} " ]; then
128+ if [ -n " $version " ]; then
129129 if version_older_than " $version " " $current_version " ; then
130130 echo " Headers already up to date ($current_version >= $version )"
131131 version=$current_version
@@ -137,15 +137,15 @@ else
137137 version=$current_version
138138fi
139139
140- if [ -n " ${ file} " ]; then
140+ if [ -n " $file " ]; then
141141 import_header $file || exit 1
142142fi
143143
144144for filename in $( find $base_path -name " *.h" -type f) ; do
145145 fixup_includes $filename || exit 1
146146done
147147
148- echo $version > ${ base_path} /version
148+ echo $version > $base_path /version
149149
150150if [ $check_headers -eq 0 ]; then
151151 exit 0
154154tmpheader=" $( mktemp -t dpdk.checkuapi.XXXXXX) "
155155trap " rm -f '$tmpheader '" INT
156156
157- echo " Checking imported headers for version ${ version} "
157+ echo " Checking imported headers for version $version "
158158
159159for filename in $( find $base_path -name " *.h" -type f) ; do
160160 header=${filename# $base_path }
0 commit comments