diff remote @ 20:0d65c3de34fd

add better logging
author carl
date Sun, 08 Jan 2006 12:36:57 -0800
parents 5dfe0138b4f9
children 2342081106d9
line wrap: on
line diff
--- a/remote	Sat Dec 24 06:27:00 2005 -0800
+++ b/remote	Sun Jan 08 12:36:57 2006 -0800
@@ -8,20 +8,27 @@
     ssh $a "$b"
 }
 
-n=syslog2iptables
-v=0.1
-t='ams ns1'
-t='mbmg'
+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
-    scp $n*gz $i:/tmp
-    me $i "cd /tmp; tar xfz $n*gz"
-    me $i "cd /tmp/$n-$v; ./configure"
-    me $i "cd /tmp/$n-$v; make"
-    me $i "cd /tmp/$n-$v; make install"
-    me $i "/etc/rc.d/init.d/$n stop"
+    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/$n-$v; make chkconfig"
+    me $i "cd /tmp/$NAME-$VER; make chkconfig"
     if [ -f remote.$i ]; then
-        scp remote.$i $i:/etc/$n.conf
+        scp remote.$i $i:/etc/$NAME.conf
+    else
+        scp /etc/$NAME.conf $i:/etc/$NAME.conf
     fi
+    me $i "/etc/rc.d/init.d/$NAME start"
 done