Merge pull request #79 from itoffshore/alpine

update-ngxblocker: fix POSIX shell compatibility / remove wget_opts
This commit is contained in:
Mitchell Krog 2017-08-24 16:55:21 +02:00 committed by GitHub
commit 58639e4e9b

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)}'