Skip to content

Instantly share code, notes, and snippets.

@apsun
Last active February 25, 2024 12:41
Show Gist options
  • Select an option

  • Save apsun/bd61e6c1ac7da5c67e256b2d5c390231 to your computer and use it in GitHub Desktop.

Select an option

Save apsun/bd61e6c1ac7da5c67e256b2d5c390231 to your computer and use it in GitHub Desktop.
#!/bin/sh
#
# Sync music from Linux to iPhone using libimobiledevice + ifuse
# Only works with apps that can read songs from iTunes file sharing (e.g. Doppi)
set -euo pipefail
if [ $# -ne 1 ]; then
echo "usage: $0 <src dir>"
exit 1
fi
APP_ID="com.ondalabs.doppi"
mnt="$(mktemp -d)"
ifuse --documents "${APP_ID}" "${mnt}"
rsync --delete --archive --progress --inplace "$1" "${mnt}"
fusermount -u "${mnt}"
rmdir "${mnt}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment