5 echo usage
: $0 dotted_version
date libgeda_sharedlib_version
7 echo " $0 1.0.1 20070626 29:1:0"
12 new_sharedlibversion
=$3
13 if [ "$new_dottedversion" = "" ]
15 echo Missing dotted version
21 if [ "$new_date" = "" ]
29 if [ "$new_sharedlibversion" = "" ]
31 echo Missing libgeda shared library version
38 old_dottedversion
=`cat libgeda/include/defines.h | \
39 grep "#define PREPEND_VERSION_STRING" | awk '{print $3}'`
41 old_date
=`grep ^VERSION= libgeda/configure.ac | \
44 old_sharedlibversion
=`grep ^SHARED_LIBRARY_VERSION libgeda/configure.ac | \
47 # Update dotted version
48 libgeda_defines
=libgeda
/include
/defines.h
49 echo Updating
$old_dottedversion to
\"$new_dottedversion-\" in $libgeda_defines
50 mv -f $libgeda_defines $libgeda_defines.orig
51 cat $libgeda_defines.orig |
sed "s/#define PREPEND_VERSION_STRING $old_dottedversion/#define PREPEND_VERSION_STRING \"$new_dottedversion-\"/" > $libgeda_defines
52 rm -f $libgeda_defines.orig
55 date_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"
59 echo Updating
$old_date to
$new_date in $i
61 cat $i.orig |
sed "s/^VERSION=$old_date/VERSION=$new_date/" > $i
65 # Update shared library version
66 libgeda_conf
=libgeda
/configure.ac
67 echo Updating
$old_sharedlibversion to
$new_sharedlibversion in $libgeda_conf
68 mv -f $libgeda_conf $libgeda_conf.orig2
69 cat $libgeda_conf.orig2 | \
70 sed "s/^SHARED_LIBRARY_VERSION=$old_sharedlibversion/SHARED_LIBRARY_VERSION=$new_sharedlibversion/" > $libgeda_conf
71 rm -f $libgeda_conf.orig2