From 82138c06f3ff1a9c2e82adc5255945b51afe0b41 Mon Sep 17 00:00:00 2001 From: Echo Date: Sat, 4 Mar 2023 15:53:13 -0500 Subject: [PATCH] Updates CLI to work with OSX base64 --- pairdrop-cli/pairdrop | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pairdrop-cli/pairdrop b/pairdrop-cli/pairdrop index 5a36d2e..9172412 100644 --- a/pairdrop-cli/pairdrop +++ b/pairdrop-cli/pairdrop @@ -106,7 +106,11 @@ sendFiles() zip -q -b /tmp/ -r "$zipPath" "$path" zip -q -b /tmp/ "$zipPathTemp" "$zipPath" - hash=$(base64 -w 0 "$zipPathTemp") + if [[ $OS == "Mac" ]];then + hash=$(base64 -i "$zipPathTemp") + else + hash=$(base64 -w 0 "$zipPathTemp") + fi # remove temporary temp file rm "$zipPathTemp" @@ -116,7 +120,11 @@ sendFiles() # Create zip file temporarily to send file zip -q -b /tmp/ "$zipPath" "$path" - hash=$(base64 -w 0 "$zipPath") + if [[ $OS == "Mac" ]];then + hash=$(base64 -i "$zipPath") + else + hash=$(base64 -w 0 "$zipPath") + fi fi # remove temporary temp file