aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinception38
1 files changed, 21 insertions, 17 deletions
diff --git a/inception b/inception
index f879166..3d54387 100755
--- a/inception
+++ b/inception
@@ -84,27 +84,31 @@ function inception_install {
# Deploy
function inception_deploy {
if [ ! -z "$2" ]; then
- REMOTE="$2"
- MODULES="`$DIRNAME/metadot/metadot installed | xargs`"
+ REMOTES="$*"
- # Sync apps
- if [ -e "$HOME/apps" ]; then
- rsync -avz --delete $HOME/apps/ $REMOTE:apps/
- fi
+ for REMOTE in $REMOTES; do
+ REMOTE="$2"
+ MODULES="`$DIRNAME/metadot/metadot installed | xargs`"
- # Sync dotfiles
- if [ -e "$HOME/.dotfiles" ]; then
- rsync -avz --delete $HOME/.dotfiles/ $REMOTE:.dotfiles/
- fi
+ # Sync apps
+ if [ -e "$HOME/apps" ]; then
+ rsync -avz --delete $HOME/apps/ $REMOTE:apps/
+ fi
- # Sync loaded modules
- ssh -T $REMOTE <<EOF
- ##### BEGIN REMOTE SCRIPT #####
- for module in $MODULES; do
- \$HOME/apps/metadot/metadot load \$module
- done
- ##### END REMOTE SCRIPT #######
+ # Sync dotfiles
+ if [ -e "$HOME/.dotfiles" ]; then
+ rsync -avz --delete $HOME/.dotfiles/ $REMOTE:.dotfiles/
+ fi
+
+ # Sync loaded modules
+ ssh -T $REMOTE <<EOF
+ ##### BEGIN REMOTE SCRIPT #####
+ for module in $MODULES; do
+ \$HOME/apps/metadot/metadot load \$module
+ done
+ ##### END REMOTE SCRIPT #######
EOF
+ done
fi
}