2013-03-25 12:04:10 +00:00
|
|
|
set -e
|
|
|
|
make dist
|
|
|
|
|
|
|
|
. ./version.sh
|
2015-02-25 17:42:04 +00:00
|
|
|
libraryVersion=$ECCODES_MAJOR_VERSION.$ECCODES_MINOR_VERSION.$ECCODES_REVISION_VERSION
|
2013-03-25 12:04:10 +00:00
|
|
|
tar=grib_api-$libraryVersion.tar.gz
|
|
|
|
dir=grib_api-$libraryVersion
|
|
|
|
|
|
|
|
rm -rf $dir | true
|
|
|
|
tar zxvf $tar
|
|
|
|
|
|
|
|
version=`grep definitionFilesVersion $dir/definitions/*.def | awk 'BEGIN {FS="\"";}{print $2;}' `
|
|
|
|
echo definitions version $version
|
|
|
|
|
|
|
|
definitions=grib_def-$version
|
|
|
|
|
|
|
|
rm -rf $definitions | true
|
|
|
|
|
|
|
|
cp -r $dir/definitions $definitions
|
|
|
|
install=$definitions/installDefinitions.sh
|
|
|
|
rm -f $install.new
|
|
|
|
sed s/%LIBRARY_VERSION%/$libraryVersion/g $install > $install.new
|
|
|
|
chmod +w $install.new
|
|
|
|
mv $install.new $install
|
|
|
|
|
|
|
|
tar zcvf $definitions.tar.gz $definitions
|
|
|
|
|
|
|
|
rm -rf $definitions $dir
|
|
|
|
|