aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-12-27 14:31:06 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-12-27 14:31:06 -0200
commit03fdeb451b3bf1c63e3f2a725bf9bdb8e137f0a7 (patch)
tree0d3b7a75a2b5803b7e9df9dab5431e67c4477c5b
parent05ea84ced3cefd57c5858c8043f349ce45a22fd5 (diff)
downloaddotfiles-03fdeb451b3bf1c63e3f2a725bf9bdb8e137f0a7.tar.gz
dotfiles-03fdeb451b3bf1c63e3f2a725bf9bdb8e137f0a7.tar.bz2
Preparing to split metadot code from modules
-rw-r--r--README.mdwn36
-rwxr-xr-xmetadot4
2 files changed, 31 insertions, 9 deletions
diff --git a/README.mdwn b/README.mdwn
index 3b79850..901c8be 100644
--- a/README.mdwn
+++ b/README.mdwn
@@ -1,20 +1,34 @@
-Metadot: a dotfile management system
-====================================
+Metadot: modular dotfile management system
+==========================================
-Inspired by https://github.com/holman/dotfiles
+Metadot allows you to easilly manage and reuse existing dotfiles repositories
+by simply cloning then to your `~/.dotfiles/modules` and renaming a few files.
+
+By being modular, it's possible to create modules for specific applications
+(vim, mutt, emcas, git, etc). By using git submodules, one can even create her
+own dotfile bundle.
+
+Inspired by [holman does dotfiles](https://github.com/holman/dotfiles) and many
+other initiatives but with a modular design to ease dotfile sharing as the
+`metadot` code is split from the dotfile folder.
Instalation
-----------
Get the code:
- git clone --recursive git://URL/dotfiles.git .dotfiles
+ git clone --recursive git://git.sarava.org/metadot.git
+
+Save the metadot repository anywhere but make sure it's available in your `$PATH`.
+Then get some modules. You can get the whole standard module bundle with:
-Then add .dotfiles folder to your path or replace your dotfiles with
+ git clone --recursive git://git.sarava.org/rhatto/dotfiles.git ~/.dotfiles
- ~/.dotfiles/metadot load profile
+This bundle will hardly suit all your needs. You can fetch individual modules or even
+start your own bundle:
-A backup will be saved.
+ mkdir -p ~/.dotfiles/modules
+ git clone --recursive git://git.sarava.org/rhatto/dotfiles/vim.git ~/.dotfiles/modules/vim
Usage
-----
@@ -31,12 +45,18 @@ Load all modules:
metadot load --all
+Update a module bundle:
+
+ metadot update
+
+Backups are made whenever a module is loaded.
+
Layout
------
- ~/.dotfiles: where all dotfiles modules are stored
- ~/.backups: backups of old config files
-- ~/.custom: your custom configuration where you can override parameters
+- ~/.custom: some modules use this folder where custom configuration can override default parameters
Module format
-------------
diff --git a/metadot b/metadot
index 3ba6c28..47af6ac 100755
--- a/metadot
+++ b/metadot
@@ -80,7 +80,9 @@ elif [ "$OPT" == "ls" ]; then
elif [ "$OPT" == "version" ]; then
( cd $DOT && git log -n 1 )
elif [ "$OPT" == "update" ]; then
- ( cd $DOT && git pull origin master && git submodule update --init )
+ if [ -d "$DOT/.git" ]; then
+ ( cd $DOT && git pull origin master && git submodule update --init )
+ fi
elif [ "$OPT" == "backup" ]; then
shift
metadot_backup $1