Added refresh button to the in-use tab in the component selection dialog
[geda-gaf/whiteaudio.git] / update-versions.sh
blob45aa63edbb485788fe45a7fb4b319a580b0383b4
1 #!/bin/sh
3 usage()
5 echo usage: $0 dotted_version date libgeda_sharedlib_version
6 echo Exmaple:
7 echo " $0 1.0.1 20070626 29:1:0"
10 new_dottedversion=$1
11 new_date=$2
12 new_sharedlibversion=$3
13 if [ "$new_dottedversion" = "" ]
14 then
15 echo Missing dotted version
16 echo ""
17 usage
18 exit 1
21 if [ "$new_date" = "" ]
22 then
23 echo Missing date
24 echo ""
25 usage
26 exit 1
29 if [ "$new_sharedlibversion" = "" ]
30 then
31 echo Missing libgeda shared library version
32 echo ""
33 usage
34 exit 1
38 old_dottedversion=`grep ^DOTTED_VERSION= Makefile | \
39 awk -F= '{print $2}'`
41 old_date=`grep ^DATE_VERSION= Makefile | \
42 awk -F= '{print $2}'`
44 old_sharedlibversion=`grep ^SHARED_LIBRARY_VERSION libgeda/configure.ac | \
45 awk -F= '{print $2}'`
47 echo Existing version info: $old_dottedversion $old_date $old_sharedlibversion
48 echo ""
50 # Update dates and dotted version in the configure scripts
51 tbd_files="docs/configure.ac examples/configure.ac gattrib/configure.ac gnetlist/configure.ac gsymcheck/configure.ac libgeda/configure.ac symbols/configure.ac utils/configure.ac gschem/configure.ac.in Makefile"
53 for i in $tbd_files
55 echo Updating $old_date / $old_dottedversion to $new_date / $new_dottedversion in $i
56 mv -f $i $i.orig
57 cat $i.orig | \
58 sed "s/^DATE_VERSION=$old_date/DATE_VERSION=$new_date/" | \
59 sed "s/^DOTTED_VERSION=$old_dottedversion/DOTTED_VERSION=$new_dottedversion/" > $i
60 rm -f $i.orig
61 done
63 # Update shared library version
64 libgeda_conf=libgeda/configure.ac
65 echo Updating $old_sharedlibversion to $new_sharedlibversion in $libgeda_conf
66 mv -f $libgeda_conf $libgeda_conf.orig2
67 cat $libgeda_conf.orig2 | \
68 sed "s/^SHARED_LIBRARY_VERSION=$old_sharedlibversion/SHARED_LIBRARY_VERSION=$new_sharedlibversion/" > $libgeda_conf
69 rm -f $libgeda_conf.orig2
71 echo ""
73 # Verification step needed here.
74 for i in $tbd_files
76 echo Verify $i
77 grep ^DOTTED_VERSION= $i
78 grep ^DATE_VERSION= $i
79 done