view remote @ 26:00bd0b0ef015 stable-1-2

reduce sleep time from 10 to 2 seconds
author carl
date Wed, 01 Feb 2006 10:58:23 -0800
parents 048cd6e642bc
children 28fec0c67646
line wrap: on
line source

#!/bin/bash

function me()
{
    a="$1"
    b="$2"
    echo "ssh $a $b"
    ssh $a "$b"
}

T=`grep AM_INIT_AUTOMAKE configure.in | cut -d'(' -f2`
NAME=`echo $T | cut -d, -f1`
VER=`echo $T | cut -d, -f2 | cut -d')' -f1`
BALL=$NAME-$VER.tar.gz
web=/home/httpd/html/510sg/$NAME
GZ=$web/packages/$BALL

t='ams ns1 mbmg'
for i in $t; do
    echo " installing on $i"
    scp $GZ $i:/tmp
    me $i "cd /tmp; tar xfz $BALL"
    me $i "cd /tmp/$NAME-$VER; ./configure"
    me $i "cd /tmp/$NAME-$VER; make"
    me $i "cd /tmp/$NAME-$VER; make install"
    me $i "/etc/rc.d/init.d/$NAME stop"
    me $i "/sbin/iptables -F INPUT"
    me $i "cd /tmp/$NAME-$VER; make chkconfig"
    me $i "ln --symbolic --force /etc/$NAME.conf /usr/local/etc/$NAME.conf"
    me $i "/etc/rc.d/init.d/$NAME start"

    echo " install done on $i, press enter to continue"
    read a
done