macOS: Fix our token wait. Again.

altool isn't guaranteed to clean up after itself, e.g. if an earthquake
takes down the Developer ID Notary Service (thanks to Jim Young for
tracking this down). Instead of checking for the existence of tokens,
check their existence and age.

Change-Id: Iac216d524a4894115ecf33589af1bbdebcc9cbab
Reviewed-on: https://code.wireshark.org/review/33856
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2019-07-05 11:03:05 -05:00
parent aa55c55fbc
commit b28ae2dc74
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ fi
max_upload_wait=$(( 5 * 60))
start=$SECONDS
while ls "$HOME"/Library/Caches/com.apple.amp.itmstransporter/UploadTokens/*.token > /dev/null 2>&1 ; do
while test -n "$( find "$HOME"/Library/Caches/com.apple.amp.itmstransporter/UploadTokens -iname "*.token" -mtime -4h )" ; do
echo -e "Another upload in progress. Waiting 5s\xe2\x80\xa6"
sleep 5
elapsed=$(( SECONDS - start ))