update-ngxblocker: fix POSIX shell compatibility / remove wget_opts

* wget_opts() no longer used so removed
* use "$*" to pass multiple paramters to POSIX shell
This commit is contained in:
Stuart Cardall 2017-08-24 14:45:09 +00:00
parent 99ee1153e3
commit 801791e65e
No known key found for this signature in database
GPG key ID: AEB857F1C891D0C6

View file

@ -104,7 +104,7 @@ check_version() {
}
check_dirs() {
local x= dirs="$@"
local x= dirs="$*"
for x in $dirs; do
if [ ! -d $x ]; then
@ -149,17 +149,6 @@ service_cmd() {
done
}
wget_opts() {
local opts=
# Busybox wget gives less verbose output by default
if [ -n "$(wget --help 2>/dev/null | grep "\-nv")" ]; then
opts="-nv"
fi
echo $opts
}
sanitize_path() {
echo $1 |tr -cd '[:alnum:] [=@=] [=.=] [=-=] [=/=] [=_=]' \
|tr -s '@.-/_' |awk '{print tolower($0)}'