]> gitweb.fluxo.info Git - metadot.git/commitdiff
Default repo option
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 19 Jun 2015 23:57:02 +0000 (20:57 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 19 Jun 2015 23:57:02 +0000 (20:57 -0300)
README.mdwn
metadot

index 88a0cf6f83b7ab631d4782771de4c3e66346da11..7e709a32eb9c4b2edb34b18c50d71fb72af0fde7 100644 (file)
@@ -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 a6fdd16f720252e55f6a466a97754cd90ab67694..69d5054a928c14264e766a2050146958f55a1291 100755 (executable)
--- 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."