eccodes/make_dist_definitions

30 lines
693 B
Plaintext
Executable File

set -e
make dist
. ./version.sh
libraryVersion=$ECCODES_MAJOR_VERSION.$ECCODES_MINOR_VERSION.$ECCODES_REVISION_VERSION
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