Skip to content

Commit

Permalink
Tested and working with Dropbox and Nextcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
fsantini committed Oct 25, 2018
1 parent ce1a1fd commit 2b93a6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/usr/local/kobocloud/getOwncloudFiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ outDir="$2"
# https://myserver.com/s/shareLink

shareID=`echo $baseURL | sed -e 's@.*s/\([^/ ]*\)$@\1@'`
davServer=`echo $baseURL | sed -e 's@.*\(http.*\)/s/[^/ ]*$@\1@'`
davServer=`echo $baseURL | sed -e 's@.*\(http.*\)/s/[^/ ]*$@\1@' -e 's@/index\.php@@'`

echo $shareID
echo $davServer
Expand Down
6 changes: 4 additions & 2 deletions src/usr/local/kobocloud/getRemoteFile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ else
curlCommand="$CURL -u $user: "
fi

echo $curlCommand
#echo $curlCommand

echo "$linkLine -> $localFile"

remoteSize=`$curlCommand -k -L --silent --head "$linkLine" | sed -n 's/^Content-Length\: \([0-9]*\).*/\1/ip'`
remoteSize=`$curlCommand -k -L --silent --head "$linkLine" | tr A-Z a-z | sed -n 's/^content-length\: \([0-9]*\).*/\1/p'`
echo "Remote size: $remoteSize"
if [ -f $localFile ]; then
localSize=`stat -c%s "$localFile"`
else
Expand All @@ -33,3 +34,4 @@ else
$curlCommand -k --silent -L -o "$localFile" "$linkLine" # restart download
fi
fi
echo "getRemoteFile ended"

0 comments on commit 2b93a6d

Please sign in to comment.