My iTunes music library has recently grown to 20 GB. This pretty much hosed the tiny 40 GB drive in my Powerbook. My solution was to move my ~/Music folder to an AFP server share named "MusicShare" (you could use a FireWire drive). I then renamed the "Music" folder on the server share to "ServerMusic." Finally, instead of a "Music" folder in my ~/home, I created a soft link named "Music" that pointed to the /Volumes/MusicShare/ServerMusic/.
But, I also wanted to carry 1 or 2 GB of MP3s with me when I was not at home. So I created a smaller "LocalMusic" folder in /Users/Shared/. I put it there so any logged-in user could play music from the same library. Then all I needed was a way to change the soft link "Music" in my ~/home directory to point to one or the other of the two "Music" folders.
So I wrote an Applescript that:
Enter this in Script Editor:
tell application "System Events"
if not (exists application process "iTunes") then
set short_name to do shell script ("id -un")
tell application "Finder"
if (exists folder "MusicShare:ServerMusic:") then
set the_path to POSIX path of file "MusicShare:ServerMusic:"
do shell script "ln -fhs '" & the_path & ¬
"' '/Users/" & short_name & "/Music'"
else
do shell script ¬
"ln -fhs '/Users/Shared/LocalMusic/' '/Users/" & ¬
short_name & "/Music'"
end if
end tell
end if
end tell
tell application "iTunes" to activate
Save the script as an Application called iTunes Script.app, paste an icon on it, and use the script in your Dock instead of iTunes. Don't forget to correct the permissions for both the script and the Music folders.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20050123205848370