mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 09:52:13 +03:00
ssh kitten: Fall back to using openssl when base64 does not exist
This commit is contained in:
parent
a2c2d81373
commit
0ddc5d030c
@ -45,6 +45,9 @@ detect_perl() {
|
||||
if command -v base64 > /dev/null 2> /dev/null; then
|
||||
base64_encode() { command base64 | command tr -d \\n\\r; }
|
||||
base64_decode() { command base64 -d; }
|
||||
elif command -v openssl > /dev/null 2> /dev/null; then
|
||||
base64_encode() { command openssl enc -A -base64; }
|
||||
base64_decode() { command openssl enc -d -base64; }
|
||||
elif command -v b64encode > /dev/null 2> /dev/null; then
|
||||
base64_encode() { command b64encode - | command sed '1d;$d' | command tr -d \\n\\r; }
|
||||
base64_decode() { command fold -w 76 | command b64decode -r; }
|
||||
|
Loading…
Reference in New Issue
Block a user