ports/textproc/translate-shell/files/patch-include_Utils.awk
Mateusz Piotrowski c13fd7c811
textproc/translate-shell: Replace textproc/google-translate-cli
- Renamed the port to match the project name

PR:	250793
Submitted by:	0mp
2022-12-02 15:13:26 +01:00

11 lines
630 B
Awk

--- include/Utils.awk.orig 2020-10-15 13:53:06 UTC
+++ include/Utils.awk
@@ -233,6 +233,8 @@ function dumpX(text, group, command, temp) {
function base64(text, command, temp) {
if (detectProgram("uname", "-s", 1) == "Linux") # GNU base64 wraps lines by default
command = "echo -n " parameterize(text) PIPE "base64 -w0"
+ if (detectProgram("gbase64", "--version")) # GNU base64 is sometimes available as gbase64
+ command = "echo -n " parameterize(text) PIPE "gbase64 -w0"
else
command = "echo -n " parameterize(text) PIPE "base64"
command = "bash -c " parameterize(command, "\"")