]> gitweb.fluxo.info Git - metadot.git/commitdiff
Placeholder for update action and fixes displayal of remote version
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 3 Apr 2017 23:50:05 +0000 (20:50 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 3 Apr 2017 23:50:05 +0000 (20:50 -0300)
metadot

diff --git a/metadot b/metadot
index c4ce8045db067c647db181ffd7cf56407f6b0c09..b74e1a650c7486427d06ce25c27483cab6f07f74 100755 (executable)
--- a/metadot
+++ b/metadot
@@ -152,7 +152,7 @@ function metadot_create {
 # Fetch dotfiles
 function metadot_fetch {
   if [ -d "$DOT/.git" ]; then
-    ( cd $DOT && $GIT fetch --all && $GIT log --show-signature -n 1 --branches=origin/master )
+    ( cd $DOT && $GIT fetch --all && $GIT log --show-signature -n 1 --remotes --branches=origin/master )
   fi
 }
 
@@ -164,15 +164,17 @@ function metadot_merge {
 }
 
 # Update your dotfiles
-#function metadot_update {
-#  if [ -d "$DOT/.git" ]; then
-#    ( cd $DOT && git pull origin master && git submodule update --init --recursive )
-#  else
-#    for module in `ls $MODULES`; do
-#      ( cd $MODULES/$module && git pull origin master && git submodule update --init --recursive )
-#    done
-#  fi
-#}
+function metadot_update {
+  echo "please run 'metadot fetch && metadot merge' instead"
+  exit 1
+  #if [ -d "$DOT/.git" ]; then
+  #  ( cd $DOT && git pull origin master && git submodule update --init --recursive )
+  #else
+  #  for module in `ls $MODULES`; do
+  #    ( cd $MODULES/$module && git pull origin master && git submodule update --init --recursive )
+  #  done
+  #fi
+}
 
 # Basic usage
 function metadot_usage {
@@ -298,7 +300,7 @@ function metadot_version {
   echo "origin/master branch:"
   echo "====================="
   echo ""
-  ( cd $DOT && $GIT log --show-signature -n 1 --branches=origin/master )
+  ( cd $DOT && $GIT log --show-signature -n 1 --remotes --branches=origin/master )
 }
 
 # Load a bundle
@@ -323,8 +325,8 @@ elif [ "$OPT" == "ls-bundle" ]; then
   metadot_ls_bundle $*
 elif [ "$OPT" == "version" ]; then
   metadot_version
-#elif [ "$OPT" == "update" ]; then
-#  metadot_update
+elif [ "$OPT" == "update" ]; then
+  metadot_update
 elif [ "$OPT" == "backup" ]; then
   shift
   metadot_backup $*