new fortean
[feisty_meow.git] / customize / fred / scripts / curies_musix_wand.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 source "$FEISTY_MEOW_SCRIPTS/core/functions.sh"
6
7 #hmmm: add the goodness around these like the nice updater.
8
9 if [[ ! ( $(hostname) =~ .*curie.* ) ]]; then
10   echo this script is only designed to run on curie with the
11   echo fred music prime external disc plugged in.
12   exit 1
13 fi
14
15 # synch our local copy on curie with the music drive, source of all goodness.
16 function get_music_from_alpha_site()
17 {
18   sep
19   echo "getting musix and basement from fred music prime device"
20   rsync -av /media/fred/fredmusicprime/musix/* /z/musix/
21   rsync -av /media/fred/fredmusicprime/basement/* /z/basement/
22   sep
23   echo
24 }
25
26 # updates the music on a remote host to our current local copy on curie.
27 function update_musix_pile()
28 {
29   sep
30   local host="$1"; shift
31   echo "$host: synching musix and basement"
32   rsync -avz /z/musix/* ${host}:/z/musix/ 
33   rsync -avz /z/basement/* ${host}:/z/basement/ 
34   sep
35   echo
36 }
37
38 # make sure the local machine, curie, is in good shape.
39 get_music_from_alpha_site
40
41 # run through the steps of updating all our machines.
42 for i in surya banshee wildmutt euphrosyne; do
43   update_musix_pile $i
44 done
45
46