]> gitweb.fluxo.info Git - hydra.git/commitdiff
Changing argument meaning for deploy
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 14 Nov 2010 16:07:21 +0000 (14:07 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 14 Nov 2010 16:07:21 +0000 (14:07 -0200)
share/hydra/deploy

index 692e8fd49f63aaf264d3fafb876d98500c34ca1e..2454bc63a83a8f6bcf480ae2bd87fd629734d0a2 100755 (executable)
@@ -8,11 +8,13 @@ source $APP_BASE/lib/hydra/functions || exit 1
 hydra_config_load
 
 # Command line arguments
-ORIGIN="$1"
+NODES="$*"
 COMMIT="347cca10fef9263bf1dd75b34123ec839de7166b"
 
 # Build node list
-NODES="`hydra $HYDRA nodes`"
+if [ -z "$NODES" ]; then
+  NODES="`hydra $HYDRA nodes`"
+fi
 
 # Validation
 if [ -z "$ORIGIN" ]; then
@@ -26,7 +28,8 @@ for node in $NODES; do
   ##### BEGIN REMOTE SCRIPT #####
   if ! which git &> /dev/null; then
     echo "Installing git..."
-    sudo aptitude install git-core -y || exit 1
+    sudo aptitude update
+    sudo aptitude install git-core -y
   fi
 
   if [ ! -d /usr/local/hydra ]; then