Skip to content

Commit

Permalink
add skipped files to filesList
Browse files Browse the repository at this point in the history
  • Loading branch information
louisabraham committed May 28, 2024
1 parent bc036b9 commit 9a775a6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/usr/local/kobocloud/getDropboxAppFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ do
if [ -z "$existingFileSize" ]; then
existingFileSize=0
fi
remotePath=`echo $item | sed 's/.*"id": "\([^"]*\)", ".*/\1/'`
localFile="$outDir/$outFileName"

echo "outFileName: $outFileName"
echo "outFileSize: $outFileSize"
Expand All @@ -38,11 +40,14 @@ do
rm "$outDir/$outFileName"
fi
if [ "$existingFileSize" -eq "$outFileSize" ]; then
echo "File $outFileName is up to date"
if grep -q "^REMOVE_DELETED" $UserConfig; then
echo "$localFile" >> "$Lib/filesList.log"
echo "Appended $localFile to filesList"
fi
continue
fi

remotePath=`echo $item | sed 's/.*"id": "\([^"]*\)", ".*/\1/'`
localFile="$outDir/$outFileName"

$KC_HOME/getRemoteFile.sh "https://content.dropboxapi.com/2/files/download" "$localFile" "$token" "$remotePath"
if [ $? -ne 0 ] ; then
echo "Having problems contacting Dropbox. Try again in a couple of minutes."
Expand Down

0 comments on commit 9a775a6

Please sign in to comment.