Source
68
68
echo "Bad argument $arg"
69
69
USAGE
70
70
exit 1
71
71
;;
72
72
esac
73
73
74
74
# Parse the Version argument into different parts
75
75
Vmajor=`echo $Versions | cut -d. -f1`
76
76
Vminor=`echo $Versions | cut -d. -f2`
77
77
Vrelease=`echo $Versions | cut -d. -f3`
78
+
Vinfo="H5edit version $arg, $ReleaseDate"
78
79
79
80
DPRINT "Vrelstr=$Vrelstr; Versions=$Versions;"
80
81
DPRINT "Major=$Vmajor; minor=$Vminor; Release=$Vrelease;"
81
82
82
83
BANNER Update files with new version information $arg $ReleaseDate
83
84
# Update configure.ac by fixing the AC_INIT statement and run bin/reconfigure
84
85
f=configure.ac
85
86
echo Update ${f} ...
86
87
if [ -w $f ]; then
87
88
ed - $f <<EOF
100
101
# Update src/h5edit.h by fixing the version information macros.
101
102
# The "$" is needed so that the "5" in H5EDIT is not replaced.
102
103
f=src/h5edit.h
103
104
echo Update ${f} ...
104
105
if [ -w $f ]; then
105
106
ed - $f <<EOF
106
107
/define H5EDIT_VER_MAJOR/s/[0-9][0-9]*$/$Vmajor/
107
108
/define H5EDIT_VER_MINOR/s/[0-9][0-9]*$/$Vminor/
108
109
/define H5EDIT_VER_RELEASE/s/[0-9][0-9]*$/$Vrelease/
109
110
/define H5EDIT_VER_SUBRELEASE/s/".*"/"$Vrelstr"/
110
-
/define H5EDIT_RELEASE_DATE/s/".*"/"$ReleaseDate"/
111
+
/define H5EDIT_VER_INFO/s/".*"/"$Vinfo"/
111
112
w
112
113
q
113
114
EOF
114
115
else
115
116
echo $f is not writable
116
117
USAGE
117
118
exit 1
118
119
fi
119
120
120
121