Last active
February 25, 2024 12:41
-
-
Save apsun/bd61e6c1ac7da5c67e256b2d5c390231 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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