Skip to content

Commit

Permalink
Modify sync_dropbox_music to use scp instead of nfs
Browse files Browse the repository at this point in the history
  • Loading branch information
madelinecr committed Sep 23, 2014
1 parent 4e652e1 commit ad54a32
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions config/zshrc
Expand Up @@ -130,15 +130,16 @@ function rtorrent () {

function sync_dropbox_music () {
# Trailing slash vital, copies contents of dir
local source=/nfs/kryten/sensae/music/
local host=sensae@kryten
local source=/home/sensae/music/
local destination=$HOME/Dropbox/Music
if [ ! -e $source ]; then
echo "Directory $source does not exist, not copying files.."
if ssh $host test ! -e $source; then
echo "Directory $source on $host does not exist, not copying files.."
elif [ ! -e $destination ]; then
echo "Directory $destination does not exist, not copying files.."
elif [ -d $source ] && [ -d $destination ]; then
echo "Syncing $source to $destination"
rsync -vazh $source $destination
elif ssh $host test -d $source && [ -d $destination ]; then
echo "Syncing $host:$source to $destination"
rsync -vazh $host:$source $destination
else
echo "General failure synchronizing music to Dropbox folder."
fi
Expand Down Expand Up @@ -300,7 +301,7 @@ alias gloga="git log $glog_settings --all"
alias glogv="git log $glog_settings --shortstat"

#android
alias rootadb="adb kill-server; sudo adb start-server"
alias rootadb="adb kill-server; sudo ~sensae/opt/android-studio/sdk/platform-tools/adb start-server"

#rvm
alias rubies="rvm list"
Expand Down

0 comments on commit ad54a32

Please sign in to comment.