Changeset

7748:4ba697569f84

configure: Use $() and quotes instead of `` [shellcheck]
author Kim Alvefur <zash@zash.se>
date Sun, 27 Nov 2016 20:46:55 +0100
parents 7746:3dff38ffdcd0
children 7749:a43a9ffd0579
files configure
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Nov 27 00:10:51 2016 +0100
+++ b/configure	Sun Nov 27 20:46:55 2016 +0100
@@ -81,7 +81,7 @@
 
 while [ "$1" ]
 do
-   value="`echo $1 | sed 's/[^=]*=\(.*\)/\1/'`"
+   value="$(echo "$1" | sed 's/[^=]*=\(.*\)/\1/')"
    if echo "$value" | grep -q "~"
    then
       echo
@@ -268,8 +268,8 @@
 
 find_program() {
    path="$PATH"
-   item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`"
-   path="`echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p'`"
+   item="$(echo "$path" | sed 's/\([^:]*\):.*/\1/')"
+   path="$(echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p')"
    found="no"
    while [ "$item" ]
    do
@@ -278,8 +278,8 @@
          found="yes"
          break
       fi
-      item="`echo "$path" | sed 's/\([^:]*\):.*/\1/'`"
-      path="`echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p'`"
+      item="$(echo "$path" | sed 's/\([^:]*\):.*/\1/')"
+      path="$(echo "$path" | sed -n 's/[^:]*::*\(.*\)/\1/p')"
    done
    if [ "$found" = "yes" ]
    then
@@ -301,7 +301,7 @@
             find_lua="$LUA_DIR"
          fi
       else
-         find_lua=`find_program lua$suffix`
+         find_lua="$(find_program lua$suffix)"
       fi
       if [ "$find_lua" ]
       then
@@ -316,12 +316,12 @@
    echo -n "Looking for Lua... "
    if [ ! "$find_lua" ]
    then
-      find_lua=`find_program lua$LUA_SUFFIX`
+      find_lua"=$(find_program lua$LUA_SUFFIX)"
       echo "lua$LUA_SUFFIX found in \$PATH: $find_lua"
    fi
    if [ "$find_lua" ]
    then
-      LUA_DIR=`dirname $find_lua`
+      LUA_DIR="$(dirname $find_lua)"
       LUA_BINDIR="$find_lua"
    else
       echo "lua$LUA_SUFFIX not found in \$PATH."