Skip to content

Commit

Permalink
Updated get.sh to put files downloaded by rclone into separate subdir…
Browse files Browse the repository at this point in the history
…ectories.
  • Loading branch information
marklar423 committed Sep 28, 2023
1 parent e567a5a commit 15dc1a6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/usr/local/kobocloud/config_kobo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 3 additions & 2 deletions src/usr/local/kobocloud/config_pc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions src/usr/local/kobocloud/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 15dc1a6

Please sign in to comment.