scripts/syncmusic.sh

20 lines
357 B
Bash
Executable File

#!/bin/bash -x
# Name of NFS server to use
SERVER=cheesecake
# Music source
SOURCE=/net/cheesecake/media/Music/vorbis/
# Music directory / destination
MUSIC=/home/anna/Music
nc -z -w 10 $SERVER 2049
if [ $? != 0 ]; then
notify-send "$0: $SERVER can't be found!"
exit 1
fi
rsync -avh --inplace --delete $SOURCE $MUSIC
notify-send "$0: Sync finished!"