From 08ca3fa5aa85561baa66ebeac9130bd96e46333d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Wed, 19 Jun 2019 05:23:51 +0200 Subject: [PATCH] switch for base64 implementation --- clickslide.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/clickslide.sh b/clickslide.sh index 291130a..d42f405 100755 --- a/clickslide.sh +++ b/clickslide.sh @@ -4,12 +4,14 @@ prev='' next='' idoff=0 depth=0 ucdepth=-1 _base64() { - { uuencode -m - <"$1" \ + # busybox does not ship base64, only uuencode. Other platforms might need base64 instead + if which uuencode; then + uuencode -m - <"$1" \ | sed '1d; :X;$!{N;bX;}; s;\n;;g; s;=\+;;g;' - } || { + else base64 <"$1" \ | sed ':X;$!{N;bX;}; s;\n;;g; s;=\+;;g;' - } + fi } { "${0%/*}"/cgilite/html-sh.sed || cat; } \ -- 2.39.2