💾 Archived View for gamma.lyk.so › systems › e-reader › scripts › ebooks-upload.sh captured on 2023-07-22 at 16:44:25.

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

#!/usr/bin/env sh

set -e

# Guess the directory the Kindle is mounted to
kindle="$(find /media -type d -name amazon-cover-bug -exec dirname {} \;)"

[ "$kindle" ] || { >&2 echo "Could not find Kindle."; exit 1; }

# The old Kindle only knows about mobi files
rsync -rv --include="*/" --include="*.mobi" --exclude="*" \
  "$HOME/extramuros/documents/ebooks/" "$kindle/documents/"