Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

Commit

Permalink
Trying to make it work for MacOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
binwiederhier committed Mar 15, 2015
1 parent 00fd9cf commit f63a1a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle/upload/upload-functions
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ upload_file() {
checksum=$(shasum -a 256 "$filename" | awk '{ print $1 }')

time=$(date +%s)
rand=$(openssl rand -base64 100 | tr -d =/ | fold -w 16 | head -n 1)
rand=$(openssl rand -base64 100 | tr -d '=/+' | fold -w 16 | head -n 1)
method_args="$method_args&filename=$basename_encoded&checksum=$checksum&time=$time&rand=$rand"

protected="PUT:$request:$method_args"
signature=$(echo -n "$protected" | openssl dgst -sha256 -hmac $SYNCANY_API_KEY | awk '{ print $2 }')
signature=$(echo -n "$protected" | openssl dgst -sha256 -hmac "$SYNCANY_API_KEY" | awk '{ print $2 }')
full_url="$SYNCANY_API_ENDPOINT/$request?$method_args&signature=$signature"

rm /tmp/curlerr.tmp 2> /dev/null || true
Expand Down

0 comments on commit f63a1a7

Please sign in to comment.