Skip to content

Latest commit

 

History

History
50 lines (30 loc) · 2.6 KB

README.textile

File metadata and controls

50 lines (30 loc) · 2.6 KB

dropsync, a DropBox configuration files synchronization utility

dropsync is a Perl script that will automatically place your selected set of configuration files (e.g. .profile, .bashrc, plist files in Mac OS X users’ Library folder, etc.)

General behavior

dropsync will first create a dropsync folder in your Dropbox folder (generally /home/<username>/Dropbox or /Users/<Username>/Dropbox under Mac OS X).

Then for every file YOU have decided, dropsync will do the following:

  • If the file is in its original location (e.g. /home/<username>/.bashrc) but NOT in the dropsync folder, the file will be moved to the dropsync (e.g. dropbox/.bashrc) folder and replaced by a symbolic link (e.g. /home/<username>/.bashrc -> dropbox/.bashrc).
  • If the file is present in the dropsync folder (e.g. dropsync/.bashrc) but no symlink pointing to this location is present, the symlink will be created (e.g. /home/<username>/.bashrc -> dropbox/.bashrc).
  • If the file is present in the dropsync folder (e.g. dropsync/.bashrc) and a file exists in the original location (e.g. /home/<username>/.bashrc), the original file will be moved for backup (e.g. /home/<username>/.bashrc_ds<timestamp>) and a new symbolic link will be created (e.g. /home/<username>/.bashrc -> dropbox/.bashrc).

Usage

dropsync [-h|--help] [--version] [--verbose|-v] [--debug|-d]
    [--config-file|-f <path to config file>]

    --help, -h          : Print this help, then exit
    --version           : Print the script version, then exit
    --verbose, -v       : Enable verbose mode
    --debug, -d         : Enable debug mode

    --config-file, -f   : Alternate location for the configuration file
                          (Default: $HOME/.dropsyncrc.yaml)

Configuration file

dropsync uses a YAML-formatted configuration file. It is mainly used to specify the list of files you would like to sync with your dropsync folder.

The default location for this configuration file is $HOME/.dropsyncrc.yaml, where $HOME is your home folder. This can be overriden using the --config-file or -f option when calling the dropsync script.

You can also use it to change some parameters (like the location of your Dropbox folder, or the name of the dropsync folder) to non-default values.

An example of configuration is given in the dropsyncrc.yaml file.

Planned (i.e. someday) features

  • Machine-specific version of files
  • Logging mechanism

License

This script is licensed under the GPL v.3
license. See previous link or gpl-3.0.txt for further details.