diff --git a/src/usr/local/kobocloud/config_kobo.sh b/src/usr/local/kobocloud/config_kobo.sh index 5b5eb2f..e3b25b7 100755 --- a/src/usr/local/kobocloud/config_kobo.sh +++ b/src/usr/local/kobocloud/config_kobo.sh @@ -6,5 +6,5 @@ UserConfig=/mnt/onboard/.add/kobocloud/kobocloudrc RCloneConfig=/mnt/onboard/.add/kobocloud/rclone.conf Dt="date +%Y-%m-%d_%H:%M:%S" RCLONEDIR="/mnt/onboard/.add/kobocloud/bin/" -RCLONE="${RCLONEDIR}/rclone" +RCLONE="${RCLONEDIR}rclone" PLATFORM=Kobo diff --git a/src/usr/local/kobocloud/config_pc.sh b/src/usr/local/kobocloud/config_pc.sh index d1054c5..8bab491 100755 --- a/src/usr/local/kobocloud/config_pc.sh +++ b/src/usr/local/kobocloud/config_pc.sh @@ -3,7 +3,8 @@ Logs=/tmp/KoboCloud Lib=/tmp/KoboCloud/Library SD=/tmp/KoboCloud/sd UserConfig=/tmp/KoboCloud/kobocloudrc -RCloneConfig=/tmp/KoboCloud/rclone.conf +RCloneConfig=~/.config/rclone/rclone.conf Dt="date +%Y-%m-%d_%H:%M:%S" -RCLONE=/usr/bin/rclone +RCLONEDIR="/usr/bin/" +RCLONE="${RCLONEDIR}rclone" PLATFORM=PC diff --git a/src/usr/local/kobocloud/get.sh b/src/usr/local/kobocloud/get.sh index 7959824..910988b 100755 --- a/src/usr/local/kobocloud/get.sh +++ b/src/usr/local/kobocloud/get.sh @@ -75,8 +75,11 @@ while read url || [ -n "$url" ]; do # Don't remove deleted, do a copy. command="copy" fi - echo ${RCLONE} ${command} --no-check-certificate -v --config ${RCloneConfig} \"$url\" \"$Lib\" - ${RCLONE} ${command} --no-check-certificate -v --config ${RCloneConfig} "$url" "$Lib" + remote=$(echo "$url" | cut -d: -f1) + dir="$Lib/$remote/" + mkdir -p "$dir" + echo ${RCLONE} ${command} --no-check-certificate -v --config ${RCloneConfig} \"$url\" \"$dir\" + ${RCLONE} ${command} --no-check-certificate -v --config ${RCloneConfig} "$url" "$dir" fi done < $UserConfig