[copy these into BitBucket, dude]
Here are Bash scripts for changing filenames and aliases so that iTunes can use an external music library. They're semi-automatic. If I wasn't afraid of my Mac becoming alive and suggesting inappropriate music selections for me, I'd make the scripts fully auto and backgroundable, so that they do their dance whenever the drive is plugged in or removed. I did make them double-clickable, at least. [working in 10.6.8]
First make sure iTunes isn't running.
To acknowledge the external drive
ls ~/Music/external_drive_is_not_attached > /dev/null &&\
ls /Volumes/G-DRIVE\ mobile/iTunes\ Media > /dev/null &&\
mv ~/Music/iTunes/iTunes\ Media ~/Music/iTunes/iTunes\ Media_temp_local &&\
ln -s /Volumes/G-DRIVE\ mobile/iTunes\ Media ~/Music/iTunes/iTunes\ Media &&\
mv ~/Library/Application\ Support/MobileSync/Backup ~/Library/Application\ Support/MobileSync/Backup_temp_local &&\
ln -s /Volumes/G-DRIVE\ mobile/MobileSync/Backup ~/Library/Application\ Support/MobileSync/Backup &&\
mv ~/Music/external_drive_is_not_attached ~/Music/external_drive_IS_locally_ATTACHED
To disavaow the external drive
ls ~/Music/external_drive_is_LOCALLY_attached > /dev/null &&\
rm ~/Music/iTunes/iTunes\ Media &&\
mv ~/Music/iTunes/iTunes\ Media_temp_local ~/Music/iTunes/iTunes\ Media &&\
rm ~/Library/Application\ Support/MobileSync/Backup &&\
mv ~/Library/Application\ Support/MobileSync/Backup_temp_local ~/Library/Application\ Support/MobileSync/Backup &&\
mv ~/Music/external_drive_is_LOCALLY_attached ~/Music/external_drive_is_not_attached
There's also [this] for a remote library.