Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

About this user

Mark Wubben http://novemberborn.net/

« Newer Snippets
Older Snippets »
1 total  XML / RSS feed 

Rsyncing to StrongSpace

This is a handy script to synchronize a number of folders with StrongSpace (or any other server).

#!/usr/bin/ruby

# `ss` is the alias for my StrongSpace login.
# `home/novemberborn/` is the directory in which I want to store stuff.
REMOTE = 'ss:/home/novemberborn/'

def rsync local_path, remote_dir
   puts `rsync -azv #{local_path} #{REMOTE}#{remote_dir}/`
   puts "\n---\n"
end

# rsync 'local_directory_path', 'remote_directory_name'
rsync '~/Documents/', 'Documents'
« Newer Snippets
Older Snippets »
1 total  XML / RSS feed