Created
February 20, 2012 06:21
-
-
Save dominics/1868109 to your computer and use it in GitHub Desktop.
Quick script to rsync music off an iPhone
This file contains 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/bash | |
# vim: set ts=4 sw=4 tw=79 et : | |
# | |
# rsyncs the music from an iPhone into the iphone directory | |
if [[ ! -z "$1" ]]; then | |
ADDRESS="$1" | |
else | |
# Attempt to use avahi to get the iPhone's IP | |
# - Make sure your iPhone is unlocked | |
# - Start Remote on the iPhone | |
# - Settings, Add library, (you'll be shown a passcode) | |
# - No, I don't know any way to get the iPhone to show up in mdns when | |
# it's not on this screen | |
# - Edit the device name below | |
DEVICE="Dominic-Scheirlincks-iPhone" | |
# If you've followed the instructions above, see the DvNm field in: | |
# avahi-browse -r -k _touch-remote._tcp | |
ADDRESS=`avahi-resolve -n "$DEVICE.local" | col | cut -f 2` | |
fi | |
echo "Connecting to iPhone at $ADDRESS" | |
rsync -avz --progress \ | |
"root@$ADDRESS:/private/var/mobile/Media/iTunes_Control/Music/" \ | |
iphone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Rsyncs the music from an iPhone into the iPhone directory~with iTunes alternative to put music on iPhone without iTunes.