From 1ec44361b8d1baaafa75e61ad7ae8eaed7bcb1f9 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 19 Jun 2015 20:57:02 -0300 Subject: Default repo option --- README.mdwn | 4 ++++ metadot | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/README.mdwn b/README.mdwn index 88a0cf6..7e709a3 100644 --- a/README.mdwn +++ b/README.mdwn @@ -31,6 +31,10 @@ Then get some modules. You can get the whole standard module bundle with metadot clone git://git.sarava.org/rhatto/dotfiles.git +Or simply using + + metadot clone default + Modules names as `dotfiles` have a special meaning and are handled like bundles and are cloned directly as `~/.dotfiles`. After cloning, you can check the current dotfiles revision using diff --git a/metadot b/metadot index a6fdd16..69d5054 100755 --- a/metadot +++ b/metadot @@ -36,6 +36,7 @@ BASENAME="`basename $0`" DOT="$DEST/.dotfiles" MODULES="$DOT/modules" BACKUPS="$DEST/.backups/$DATE" +DEFAULT="git://git.sarava.org/rhatto/dotfiles.git" # Backup a file function metadot_backup { @@ -118,7 +119,11 @@ elif [ "$OPT" == "backup" ]; then metadot_backup $1 elif [ "$OPT" == "clone" ]; then shift - if [ "`basename $1 .git`" == "dotfiles" ]; then + if [ "$1" == "default" ]; then + metadot_backup $DOT + git clone --recursive $DEFAULT $DOT + echo "Backups saved at $BACKUPS." + elif [ "`basename $1 .git`" == "dotfiles" ]; then metadot_backup $DOT git clone --recursive $1 $DOT echo "Backups saved at $BACKUPS." -- cgit v1.2.3