X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=clickslide.sh;h=750b6b0c05380c918ab8426f61cc6ae21ea46956;hb=f52aaffb50e1fd6e47a7a603966a15cf3b6bbb4a;hp=b1fd229bb1851d3f31f9854a48c2776305c7e550;hpb=14c693f2eabbe45c39aab56b0440ae778c638a00;p=vhs_kurs diff --git a/clickslide.sh b/clickslide.sh index b1fd229..750b6b0 100755 --- a/clickslide.sh +++ b/clickslide.sh @@ -8,6 +8,9 @@ _base64() { if which uuencode >/dev/null; then uuencode -m - <"$1" \ | sed '1d; :X;$!{N;bX;}; s;\n;;g; s;=\+;;g;' + elif which busybox >/dev/null; then + busybox 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;' @@ -16,13 +19,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