Made the code more readable, Fixed code and typo #574
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
eg:
$? == 0 (BAD)
$? -eq 0 (GOOD)
$? != 0 (BAD)
$? -ne 0 (GOOD)
BAD:
function ansure_accesstoken () {
local NOW =
date +%s
}
GOOD:
ansure_accesstoken () {
local now = $(date +%s)
}
BAD:
let NUMBEROFCHUNK=($FILE_SIZE/1024/1024+$CHUNK_SIZE-1)/$CHUNK_SIZE
GOOD:
((number_of_chunk = (file_size / 1024 / 1024 + CHUNK_SIZE - 1) / CHUNK_SIZE))
Add little more test for config file before source it to prevent error
Fixed return code when calling check_http_response function, it did not have an argument of '$?' at the end.
Fixed typo