]> git.donarmstrong.com Git - bin.git/blobdiff - new_home_directory
make ping only ping once, and wait for a max of three seconds for a response
[bin.git] / new_home_directory
index 99585bdb10e4e994649be1eb07e45b20c7c8272d..f32e7aa68d7aa4cd519728fe824e95c48be77bfd 100755 (executable)
@@ -24,7 +24,7 @@ for pkg in mr vcsh; do
         mkdir -p bin
         ln ~/local_packages/$pkg/usr/bin/$pkg bin/$pkg -s
         if [ "$pkg" == "mr" ]; then
-            echo "include = cat ~/local_packages/$pkg/usr/share/mr/*" >> ~/.mrconfig
+            echo -e "[DEFAULT]\ninclude = cat ~/local_packages/$pkg/usr/share/mr/*" >> ~/.mrconfig
         fi;
         PATH="$HOME/local_packages/$pkg/usr/bin/:$PATH"
         export PATH
@@ -46,7 +46,7 @@ for a in lib bin; do
     fi;
 done;
 
-if [ "$1" = "ssh" ]; then
+if [ "$1" == "ssh" ]; then
     mkdir -p .config/;
     (cd .config/;
         git checkout git+ssh://git.donarmstrong.com/srv/git_private/mr.git
@@ -55,6 +55,7 @@ if [ "$1" = "ssh" ]; then
 else 
     vcsh clone $GIT_BASE/mr.git mr;
 fi;
+
 mr checkout;
 
 for a in .zsh .ssh; do
@@ -67,7 +68,7 @@ for a in .zsh .ssh; do
 done;
 
 if [ ! -e .ssh/authorized_keys ]; then
-    (cd .ssh/; ln authorized_keys_default authorized_keys -s;)
+    (cd .ssh/; ln authorized_keys_default authorized_keys -s; )
 fi;
 
 # do some cleanup; you might want to run git reset --hard in some
@@ -76,8 +77,9 @@ fi;
 mr run git reset --soft origin/master
 mr up
 
-# make sure mr and vcsh are in ~/bin if they are in ~/bin.bak
+# move mr and vcsh to ~/bin if they are in ~/bin.bak
 for pkg in mr vcsh; do
     if [ -e ~/bin.bak/$pkg ]; then
-        cp ~/bin.bak/$pkg ~/bin/$pkg;
+        mv ~/bin.bak/$pkg ~/bin/;
     fi;
+done;