From 07271ef4885704a760e389e748a2544ddeff4f15 Mon Sep 17 00:00:00 2001 From: Stuart Cardall Date: Wed, 2 Jan 2019 12:42:36 +0000 Subject: [PATCH] find_binary() less ambiguous variables closes https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker/issues/238 --- setup-ngxblocker | 4 ++-- update-ngxblocker | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup-ngxblocker b/setup-ngxblocker index 4cbc9142a..e4107155c 100755 --- a/setup-ngxblocker +++ b/setup-ngxblocker @@ -285,10 +285,10 @@ check_args() { } find_binary() { - local x= path= bin=$1 bin_paths='/bin /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /root/bin /root/.bin' + local x= path= binary=$1 bin_paths='/bin /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /root/bin /root/.bin' for x in $bin_paths; do - path="$x/$bin" + path="$x/$binary" if [ -x $path ]; then echo $path diff --git a/update-ngxblocker b/update-ngxblocker index 9746c1e12..30c8ae581 100755 --- a/update-ngxblocker +++ b/update-ngxblocker @@ -121,10 +121,10 @@ check_dirs() { } find_binary() { - local x= path= bin=$1 bin_paths='/bin /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /root/bin /root/.bin' + local x= path= binary=$1 bin_paths='/bin /usr/bin /usr/local/bin /usr/sbin /usr/local/sbin /root/bin /root/.bin' for x in $bin_paths; do - path="$x/$bin" + path="$x/$binary" if [ -x $path ]; then echo $path