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

Commit

Permalink
Make upload functions Mac compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
binwiederhier committed Mar 15, 2015
1 parent 3d5e00e commit 00fd9cf
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,7 +40,7 @@ upload_file() {
checksum=$(shasum -a 256 "$filename" | awk '{ print $1 }')

time=$(date +%s)
rand=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | 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"
Expand Down Expand Up @@ -68,7 +68,7 @@ upload_file() {
echo ""
echo "Details:"
echo ""
cat /tmp/curlerr.tmp | sed -r 's/signature=\w+/signature=[REMOVED]/'
cat /tmp/curlerr.tmp | sed -E 's/signature=\w+/signature=[REMOVED]/'
echo ""
fi

Expand Down

0 comments on commit 00fd9cf

Please sign in to comment.