From: Paul Hänsch Date: Wed, 24 Apr 2019 18:33:54 +0000 (+0200) Subject: portability: prevent crashes in bash X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=2547aa4b8661f92892632b97a86dc14eacdc2a2d;p=clickslide portability: prevent crashes in bash --- diff --git a/clickslide.sh b/clickslide.sh index 980365f..e78f1c7 100755 --- a/clickslide.sh +++ b/clickslide.sh @@ -33,7 +33,7 @@ base64() { pre="${tag%%url(*)*}" post="${tag#*url(*)}" file="${tag#${pre}url(}" file="${file%)$post}" - file="${file#"}" file="${file%"}" + file="${file#\"}" file="${file%\"}" echo Inlining Background Image "$file" >&2 if [ -r "$file" ]; then tag="${pre}url('data:image/${file##*.};base64,$(base64 "$file")')${post}"