Permalink
Browse files

Added a .bash_local overwrite option -l

  • Loading branch information...
Brad Lhotsky
Brad Lhotsky committed Apr 27, 2012
1 parent f32cd9c commit 827de429f59b319f9a049a2b5b6058f8c3ebc286
Showing with 15 additions and 3 deletions.
  1. +15 −3 support/movein.sh
View
@@ -1,5 +1,12 @@
#!/bin/sh
+if [ "$1" == "-l" ]; then
+ LOCAL_OVERWRITE=1;
+ shift 1;
+else
+ LOCAL_OVERWRITE=0;
+fi;
+
HOST=$1
SSH="/usr/bin/ssh"
@@ -55,9 +62,14 @@ $SSH $HOST "~/bin/dotfiles-install.sh"
echo " => dotfiles installed."
## bash_local for non-distributed changes
-$SSH $HOST "test -f ~/.bash_local"
-rc=$?
-if [ "$rc" -ne "0" ]; then
+if [ $LOCAL_OVERWRITE -eq 0 ]; then
+ $SSH $HOST "test -f ~/.bash_local"
+ rc=$?
+ if [ "$rc" -ne "0" ]; then
+ LOCAL_OVERWRITE=1;
+ fi;
+fi;
+if [ $LOCAL_OVERWRITE -eq 1 ]; then
$SCP ~/.bash_local $HOST:~
echo " => Setting a default ~/.bash_local";
fi;

0 comments on commit 827de42

Please sign in to comment.