X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=clickslide%2Fclickslide.sh;h=ad28b0b4ce6f4bf55a9f144ac688e62845cae63c;hb=1cdc62ad9f12af993162ffb258ae4ad92f608b45;hp=d42f4059b55bc2c1975195904c81d26245bd955a;hpb=8a924700257f760132501cfc7114e5eb31bb11a9;p=vhs_kurs diff --git a/clickslide/clickslide.sh b/clickslide/clickslide.sh index d42f405..ad28b0b 100755 --- a/clickslide/clickslide.sh +++ b/clickslide/clickslide.sh @@ -5,7 +5,7 @@ depth=0 ucdepth=-1 _base64() { # busybox does not ship base64, only uuencode. Other platforms might need base64 instead - if which uuencode; then + if which uuencode >/dev/null; then uuencode -m - <"$1" \ | sed '1d; :X;$!{N;bX;}; s;\n;;g; s;=\+;;g;' else @@ -16,13 +16,13 @@ _base64() { { "${0%/*}"/cgilite/html-sh.sed || cat; } \ | { - line="$(line)" + read -r line while :; do tag="${tag}${line%%>*}" if [ "$line" = "${line%%>*}" ]; then # $line did not contain ">" and thus was added to $tag entirely - if ! line="$(line)"; then + if ! read -r line; then printf %s\\n "$tag" break fi