]> gitweb.fluxo.info Git - rhatto/apps.git/commitdiff
Two-stage inception
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 20 Jun 2015 01:18:03 +0000 (22:18 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 20 Jun 2015 01:18:03 +0000 (22:18 -0300)
README.md
inception

index 406e75fe392c2e8054d42187e0dc20fbad8b192e..9c6170f21df8b5f9091e7175e98ad319a4ed9eaa 100644 (file)
--- a/README.md
+++ b/README.md
@@ -23,6 +23,10 @@ Inception
 
 A more radical approach takes over of all your environment (shell and desktop experience):
 
-    $HOME/apps/inception
+    $HOME/apps/inception init
 
-Then logout and log in again. You should have a nice workspace now.
+Then, after manually checking repository versions:
+
+    $HOME/apps/inception load
+
+You should have a nice workspace now :)
index 558dd6a4c36318cc9c07c56955aeebea62a58068..6602670f68d2377075d6b8945342308f9ed57bef 100755 (executable)
--- a/inception
+++ b/inception
@@ -7,19 +7,38 @@
 BASENAME="`basename $0`"
 DIRNAME="`dirname $0`"
 
-# Setup
-(
-  cd $DIRNAME
-
-  echo "Initializing submodules..."
-  git submodule update --init
-  
-  echo "Cloning default dotfiles..."
-  ./metadot/metadot clone default
-
-  echo "Loading all dotfiles..."
-  ./metadot/metadot load --all
-)
-
-# Teardown
-echo "Done. Logout and login again to apply all changes."
+# Main
+if [ -z "$1" ] || [ "$1" == "init" ]; then
+  (
+    cd $DIRNAME
+
+    echo "Initializing submodules..."
+    git submodule update --init
+
+    echo "Cloning default dotfiles..."
+    ./metadot/metadot clone default
+
+    echo "Checking latest tag..."
+    cd $HOME/.dotfiles
+    $DIRNAME/utils-git/git-check-tag
+
+    echo "Checking out the latest tag..."
+    $DIRNAME/utils-git/git-checkout-tag
+
+    echo "Checking dotfiles..."
+    ./metadot/metadot version
+
+    echo ""
+    echo "Please manually verify dotfiles version and tag from the above output."
+    echo "If everything is fine, proceed running this command again with the 'load' parameter."
+  )
+elif [ "$1" == "load" ]; then
+  (
+    cd $DIRNAME
+
+    echo "Loading all dotfiles..."
+    ./metadot/metadot load --all
+  )
+
+  echo "Done. Logout and login again to apply all changes."
+fi