andreafabrizi / Dropbox-Uploader

Dropbox Uploader is a BASH script which can be used to upload, download, list or delete files from Dropbox, an online file sharing, synchronization and backup service.
https://www.andreafabrizi.it/2016/01/01/Dropbox-Uploader/
GNU General Public License v3.0
6.56k stars 1.08k forks source link

Made the code more readable, Fixed code and typo #574

Open arafatx opened 1 year ago

arafatx commented 1 year ago

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))