4f44e4ae6fcd1de76a9bea627c11007a33333e5d
[feisty_meow.git] / customize / fred / scripts / update_musix_on_curie.sh
1 #!/bin/bash
2
3 # this script is meant to be run on curie with our super alpha prime source of music plugged in.
4
5 #hmmm: add the goodness around these like the nice updater.
6
7 if [[ ! ( $(hostname) =~ .*curie.* ) ]]; then
8   echo this script is only designed to run on curie with the
9   echo fred music prime external disc plugged in.
10   exit 1
11 fi
12
13 # synch our local copy on curie with the music drive, source of all goodness.
14 function get_music_from_alpha_site()
15 {
16   rsync -av /media/fred/fredmusicprime/musix/* /z/musix/
17   rsync -av /media/fred/fredmusicprime/basement/* /z/basement/
18 }
19
20 # updates the music on a remote host to our current local copy on curie.
21 function update_musix_pile()
22 {
23   local host="$1"; shift
24   rsync -avz /z/musix/* ${host}:/z/musix/ 
25   rsync -avz /z/basement/* ${host}:/z/basement/ 
26 }
27
28 # make sure the local machine, curie, is in good shape.
29 get_music_from_alpha_site
30
31 # run through the steps of updating all our machines.
32 for i in surya banshee wildmutt euphrosyne; do
33   update_musix_pile $i
34 done
35
36