My friend Hans posted on using rsync with his mp3 player. He came up with pretty much the same thing I did, so I figured not only was it about time to post to my blog again, but I should put up my script which works great for me.
#!/bin/sh
MP3="${HOME}/planetary"
NO="no"
MAYBE="maybe"
USB="/media/usbdisk/podcast"
RSYNC="rsync -vae ssh --delete --delete-excluded --modify-window=1"
case "$1" in
no)
${RSYNC} --exclude-from "${MP3}/${NO}" "${MP3}/" "${USB}/"
;;
maybe)
${RSYNC} --exclude-from "${MP3}/${MAYBE}" "${MP3}/" "${USB}/"
;;
*)
${RSYNC} "${MP3}/" "${USB}/"
;;
esac
sync
I stole the "--modify-window=1" bit from Hans, but the rest I wrote. The reason for the "no" and "maybe" files is that I listen to Coverville which is way too big to fit on my 256MB flash drive. So I only listen to that on my computer and export everything else. I also use it for a video podcast from Ming Tsai and whenever I get really far behind on a podcast.
Recent comments