Skip to content

Commit 7a23623

Browse files
authored
Update get_azure_share_sas.sh (#69)
1 parent c531430 commit 7a23623

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

get_azure_share_sas/get_azure_share_sas.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ else
2929
fi;
3030

3131

32+
echo "Expiration date \"$EXPIRATION_DATE\""
33+
if [[ "$OSTYPE" =~ ^darwin ]]; then
34+
end=$(date -v+10M "+%Y-%m-%dT%H:%MZ")
35+
else
36+
end=$(date -d "$EXPIRATION_DATE" '+%Y-%m-%dT%H:%MZ')
37+
fi;
3238

33-
end=$(date -d "$EXPIRATION_DATE" '+%Y-%m-%dT%H:%MZ')
3439
echo "Generating SAS for $destination with expiration date $end"
3540
sas=$(
3641
az storage account generate-sas \

0 commit comments

Comments
 (0)