/[slony-test]/adsl/test_difference.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /adsl/test_difference.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (hide annotations)
Sun Feb 11 22:07:25 2007 UTC (15 years, 3 months ago) by dpavlin
File MIME type: application/x-sh
File size: 576 byte(s)
symlink renaming

1 dpavlin 1
2     #echo "** sync"
3     #slonik_execute_script -c 'select now();' 1 | slonik
4    
5 dpavlin 3 op='=='
6     echo $0 $1 | grep 'diff' >/dev/null && op='!='
7 dpavlin 1
8 dpavlin 3 echo "name [$0 $1] op [$op]"
9 dpavlin 1
10     psql="sudo -u postgres psql adsl"
11     master="`$psql -p 5001 -c 'select * from po_mjesecima'`"
12     echo -e "## MASTER\n$master"
13     slave=''
14     oldslave=''
15 dpavlin 3 while [ ! "$master" $op "$slave" -o "$slave" == '' ] ; do
16 dpavlin 1 slave="`$psql -p 5002 -c 'select * from po_mjesecima'`"
17     if [ "$oldslave" != "$slave" ]
18     then
19     echo -e "$op SLAVE\n$slave"
20     else
21     echo -n "."
22 dpavlin 3 sleep 2
23 dpavlin 1 fi
24     oldslave="$slave"
25     done
26    
27     echo "** OK -- master $op slave **"

Properties

Name Value
svn:executable

  ViewVC Help
Powered by ViewVC 1.1.26