]> git.plutz.net Git - cgilite/commitdiff
try automatic switching to busybox for uuencode and sha256sum
authorPaul Hänsch <paul@plutz.net>
Sat, 15 May 2021 10:56:33 +0000 (12:56 +0200)
committerPaul Hänsch <paul@plutz.net>
Sat, 15 May 2021 10:56:33 +0000 (12:56 +0200)
session.sh

index b52ac0a5cc6fab71ba8a7926c27ac692a5c867de..b9cef4d3dc2cdfd544b5499754bb9f489010f9b4 100755 (executable)
@@ -3,6 +3,13 @@
 [ -n "$include_session" ] && return 0
 include_session="$0"
 
+if ! which uuencode >/dev/null; then
+  uuencode() { busybox uuencode "$@"; }
+fi
+if ! which sha256sum >/dev/null; then
+  sha256sum() { busybox sha256sum "$@"; }
+fi
+
 _DATE="$(date +%s)"
 SESSION_TIMEOUT="${SESSION_TIMEOUT:-7200}"