Yes, corrected script follows:
Code:
#!/bin/bash
dropbox start
dropbox status
echo -n "SYNCING CALIBRE"
wait_time=15
i=0
while [ $i -le $wait_time ]; do
sleep 1
echo -n .
((i++))
done
dropbox stop
echo -n "STOPPING DROPBOX"
i=0
while [ $i -le $wait_time ]; do
sleep 1
echo -n .
((i++))
done
calibre
echo - n "SYNCING DROPBOX"
i=0
while [ $i -le $wait_time ]; do
sleep 1
echo -n .
((i++))
done
dropbox start
dropbox status
i=0
while [ $i -le $wait_time ]; do
sleep 1
echo -n .
((i++))
done
dropbox stop
The Dropbox does not appear to have a method for querying the sync state. So the script uses an arbitrary wait time.