Software / code / prosody
Comparison
configure @ 7748:4ba697569f84
configure: Use $() and quotes instead of `` [shellcheck]
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 27 Nov 2016 20:46:55 +0100 |
| parent | 7632:2b14e2121700 |
| child | 7749:a43a9ffd0579 |
comparison
equal
deleted
inserted
replaced
| 7746:3dff38ffdcd0 | 7748:4ba697569f84 |
|---|---|
| 79 } | 79 } |
| 80 | 80 |
| 81 | 81 |
| 82 while [ "$1" ] | 82 while [ "$1" ] |
| 83 do | 83 do |
| 84 value="`echo $1 | sed 's/[^=]*=\(.*\)/\1/'`" | 84 value="$(echo "$1" | sed 's/[^=]*=\(.*\)/\1/')" |
| 85 if echo "$value" | grep -q "~" | 85 if echo "$value" | grep -q "~" |
| 86 then | 86 then |
| 87 echo | 87 echo |
| 88 echo '*WARNING*: the "~" sign is not expanded in flags.' | 88 echo '*WARNING*: the "~" sign is not expanded in flags.' |
| 89 echo 'If you mean the home directory, use $HOME instead.' | 89 echo 'If you mean the home directory, use $HOME instead.' |
| 266 LIBDIR=$PREFIX/lib | 266 LIBDIR=$PREFIX/lib |
| 267 fi | 267 fi |
| 268 | 268 |
| 269 find_program() { | 269 find_program() { |
| 270 path="$PATH" | 270 path="$PATH" |
| 271 item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`" | 271 item="$(echo "$path" | sed 's/\([^:]*\):.*/\1/')" |
| 272 path="`echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p'`" | 272 path="$(echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p')" |
| 273 found="no" | 273 found="no" |
| 274 while [ "$item" ] | 274 while [ "$item" ] |
| 275 do | 275 do |
| 276 if [ -f "$item/$1" ] | 276 if [ -f "$item/$1" ] |
| 277 then | 277 then |
| 278 found="yes" | 278 found="yes" |
| 279 break | 279 break |
| 280 fi | 280 fi |
| 281 item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`" | 281 item="$(echo "$path" | sed 's/\([^:]*\):.*/\1/')" |
| 282 path="`echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p'`" | 282 path="$(echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p')" |
| 283 done | 283 done |
| 284 if [ "$found" = "yes" ] | 284 if [ "$found" = "yes" ] |
| 285 then | 285 then |
| 286 echo "$item" | 286 echo "$item" |
| 287 else | 287 else |
| 299 if [ -f "$LUA_DIR/bin/lua$suffix" ] | 299 if [ -f "$LUA_DIR/bin/lua$suffix" ] |
| 300 then | 300 then |
| 301 find_lua="$LUA_DIR" | 301 find_lua="$LUA_DIR" |
| 302 fi | 302 fi |
| 303 else | 303 else |
| 304 find_lua=`find_program lua$suffix` | 304 find_lua="$(find_program lua$suffix)" |
| 305 fi | 305 fi |
| 306 if [ "$find_lua" ] | 306 if [ "$find_lua" ] |
| 307 then | 307 then |
| 308 echo "Lua interpreter found: $find_lua/lua$suffix..." | 308 echo "Lua interpreter found: $find_lua/lua$suffix..." |
| 309 break | 309 break |
| 314 if [ "$LUA_DIR_SET" != "yes" ] | 314 if [ "$LUA_DIR_SET" != "yes" ] |
| 315 then | 315 then |
| 316 echo -n "Looking for Lua... " | 316 echo -n "Looking for Lua... " |
| 317 if [ ! "$find_lua" ] | 317 if [ ! "$find_lua" ] |
| 318 then | 318 then |
| 319 find_lua=`find_program lua$LUA_SUFFIX` | 319 find_lua"=$(find_program lua$LUA_SUFFIX)" |
| 320 echo "lua$LUA_SUFFIX found in \$PATH: $find_lua" | 320 echo "lua$LUA_SUFFIX found in \$PATH: $find_lua" |
| 321 fi | 321 fi |
| 322 if [ "$find_lua" ] | 322 if [ "$find_lua" ] |
| 323 then | 323 then |
| 324 LUA_DIR=`dirname $find_lua` | 324 LUA_DIR="$(dirname $find_lua)" |
| 325 LUA_BINDIR="$find_lua" | 325 LUA_BINDIR="$find_lua" |
| 326 else | 326 else |
| 327 echo "lua$LUA_SUFFIX not found in \$PATH." | 327 echo "lua$LUA_SUFFIX not found in \$PATH." |
| 328 echo "You may want to use the flags --with-lua and/or --lua-suffix. See --help." | 328 echo "You may want to use the flags --with-lua and/or --lua-suffix. See --help." |
| 329 exit 1 | 329 exit 1 |