Created
March 27, 2011 01:58
-
-
Save raid5/888840 to your computer and use it in GitHub Desktop.
Revisions
-
raid5 revised this gist
Apr 9, 2011 . 1 changed file with 9 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,7 @@ #!/bin/sh RSYNC_DEFAULT_OPTIONS="-r -t -v -L --ignore-existing --delete --stats --progress" RSYNC_TEMP_DIR="./tmp_rsync_dir/" # Sources ITUNES_PODCASTS_DIR="/Users/adam/Music/iTunes/iTunes Music/Podcasts/" @@ -14,7 +15,7 @@ ALBUMS=( "Rebelution/Courage To Grow" "Rise Against/Endgame" "The Ataris/So Long, Astoria" "The Rocket Summer/Of Men And Angels" "Thrice/Beggars" "Thrice/Vheissu" ) @@ -28,5 +29,9 @@ rsync $RSYNC_DEFAULT_OPTIONS "$ITUNES_PODCASTS_DIR" "$ATRIX_PODCASTS_DIR" # Sync music for album in "${ALBUMS[@]}"; do mkdir -p "${RSYNC_TEMP_DIR}${album}" ln -fs "${ITUNES_MUSIC_DIR}${album}" "${RSYNC_TEMP_DIR}${album}" done rsync $RSYNC_DEFAULT_OPTIONS "$RSYNC_TEMP_DIR" "$ATRIX_MUSIC_DIR" rm -rf "${RSYNC_TEMP_DIR}" -
raid5 created this gist
Mar 27, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ #!/bin/sh RSYNC_DEFAULT_OPTIONS="-r -t -v --stats --progress" # Sources ITUNES_PODCASTS_DIR="/Users/adam/Music/iTunes/iTunes Music/Podcasts/" ITUNES_MUSIC_DIR="/Users/adam/Music/iTunes/iTunes Music/" ALBUMS=( "Bone Thugs-N-Harmony/Strength & Loyalty" "Bone Thugs-N-Harmony/The Collection Volume Two" "Forever The Sickest Kids/Forever The Sickest Kids" "Eminem/The Slim Shady LP" "Rebelution/Bright Side Of Life" "Rebelution/Courage To Grow" "Rise Against/Endgame" "The Ataris/So Long, Astoria" "The Offspring/Smash" "Thrice/Beggars" "Thrice/Vheissu" ) # Destinations ATRIX_PODCASTS_DIR="/Volumes/ATRIXSD/Podcasts/" ATRIX_MUSIC_DIR="/Volumes/ATRIXSD/Music/" # Sync podcasts rsync $RSYNC_DEFAULT_OPTIONS "$ITUNES_PODCASTS_DIR" "$ATRIX_PODCASTS_DIR" # Sync music for album in "${ALBUMS[@]}"; do rsync $RSYNC_DEFAULT_OPTIONS "${ITUNES_MUSIC_DIR}${album}" "$ATRIX_MUSIC_DIR" done