Fix provisioning failing due to partial downloads.

'$COMMIT' was originally printed in '$COMMIT_FILE_PATH' before all
respective files were downloaded, meaning that this step
wouldn't be repeated if one download failed. This commit prints
'$COMMIT' only after all downloads were successful.
This commit is contained in:
derAnfaenger 2017-04-22 20:13:33 +02:00 committed by Tim Abbott
parent a67ade2419
commit 2adf641b72
1 changed files with 1 additions and 1 deletions

View File

@ -18,10 +18,10 @@ fi
if [ "$CURRENT_COMMIT" == "$COMMIT" ]; then
echo "Already at latest version of iamcal's dataset."
else
echo "$COMMIT" > "$COMMIT_FILE_PATH"
wget "https://raw.githubusercontent.com/iamcal/emoji-data/$COMMIT/emoji_pretty.json" -O "$OUTPUT_PATH/emoji.json"
wget "https://raw.githubusercontent.com/iamcal/emoji-data/$COMMIT/sheet_apple_32.png" -O "$OUTPUT_PATH/sheet_apple_32.png"
wget "https://raw.githubusercontent.com/iamcal/emoji-data/$COMMIT/sheet_emojione_32.png" -O "$OUTPUT_PATH/sheet_emojione_32.png"
wget "https://raw.githubusercontent.com/iamcal/emoji-data/$COMMIT/sheet_google_32.png" -O "$OUTPUT_PATH/sheet_google_32.png"
wget "https://raw.githubusercontent.com/iamcal/emoji-data/$COMMIT/sheet_twitter_32.png" -O "$OUTPUT_PATH/sheet_twitter_32.png"
echo "$COMMIT" > "$COMMIT_FILE_PATH"
fi