Changeset View
Changeset View
Standalone View
Standalone View
build-aux/update-cmake-version.sh
- This file was added.
| Property | Old Value | New Value |
|---|---|---|
| File Mode | null | 100755 |
| #! /bin/sh | |||||
| # SPDX-FileCopyrightText: 2024 g10 Code GmbH | |||||
| # | |||||
| # This file is free software; as a special exception the author gives | |||||
| # unlimited permission to copy and/or distribute it, with or without | |||||
| # modifications, as long as this notice is preserved. | |||||
| # | |||||
| # This program is distributed in the hope that it will be useful, but | |||||
| # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the | |||||
| # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | |||||
| # | |||||
| # This script updates the version informaion in the CMakeLists.txt to match | |||||
| # the one from configure.ac | |||||
| # | |||||
| # Usage: | |||||
| # ./build-aux/update-cmake-version.sh | |||||
| configure_ac="configure.ac" | |||||
| version_major=`grep "mym4_major]" "$configure_ac" | sed -e "s/m4_define(\[mym4_major\], \[\([0-9]*\)\])/\1/g"` | |||||
| version_minor=`grep "mym4_minor]" "$configure_ac" | sed -e "s/m4_define(\[mym4_minor\], \[\([0-9]*\)\])/\1/g"` | |||||
| version_micro=`grep "mym4_micro]" "$configure_ac" | sed -e "s/m4_define(\[mym4_micro\], \[\([0-9]*\)\])/\1/g"` | |||||
| gpgmepp_lt_current=`grep "LIBGPGMEPP_LT_CURRENT=" "$configure_ac" | sed -e "s/LIBGPGMEPP_LT_CURRENT=\([0-9]*\)/\1/g"` | |||||
| gpgmepp_lt_age=`grep "LIBGPGMEPP_LT_AGE=" "$configure_ac" | sed -e "s/LIBGPGMEPP_LT_AGE=\([0-9]*\)/\1/g"` | |||||
| gpgmepp_lt_revision=`grep "LIBGPGMEPP_LT_REVISION=" "$configure_ac" | sed -e "s/LIBGPGMEPP_LT_REVISION=\([0-9]*\)/\1/g"` | |||||
| sed -e "s/set(LIBGPGMEPP_MAJOR [0-9]*)/set(LIBGPGMEPP_MAJOR $version_major)/g" \ | |||||
| -e "s/set(LIBGPGMEPP_MINOR [0-9]*)/set(LIBGPGMEPP_MINOR $version_minor)/g" \ | |||||
| -e "s/set(LIBGPGMEPP_MICRO [0-9]*)/set(LIBGPGMEPP_MICRO $version_micro)/g" \ | |||||
| -e "s/set(LIBGPGMEPP_LT_CURRENT [0-9]*)/set(LIBGPGMEPP_LT_CURRENT $gpgmepp_lt_current)/g" \ | |||||
| -e "s/set(LIBGPGMEPP_LT_AGE [0-9]*)/set(LIBGPGMEPP_LT_AGE $gpgmepp_lt_age)/g" \ | |||||
| -e "s/set(LIBGPGMEPP_LT_REVISION [0-9]*)/set(LIBGPGMEPP_LT_REVISION $gpgmepp_lt_revision)/g" \ | |||||
| -i lang/cpp/CMakeLists.txt | |||||
| qgpgme_lt_current=`grep "LIBQGPGME_LT_CURRENT=" "$configure_ac" | sed -e "s/LIBQGPGME_LT_CURRENT=\([0-9]*\)/\1/g"` | |||||
| qgpgme_lt_age=`grep "LIBQGPGME_LT_AGE=" "$configure_ac" | sed -e "s/LIBQGPGME_LT_AGE=\([0-9]*\)/\1/g"` | |||||
| qgpgme_lt_revision=`grep "LIBQGPGME_LT_REVISION=" "$configure_ac" | sed -e "s/LIBQGPGME_LT_REVISION=\([0-9]*\)/\1/g"` | |||||
| sed -e "s/set(LIBQGPGME_MAJOR [0-9]*)/set(LIBQGPGME_MAJOR $version_major)/g" \ | |||||
| -e "s/set(LIBQGPGME_MINOR [0-9]*)/set(LIBQGPGME_MINOR $version_minor)/g" \ | |||||
| -e "s/set(LIBQGPGME_MICRO [0-9]*)/set(LIBQGPGME_MICRO $version_micro)/g" \ | |||||
| -e "s/set(LIBQGPGME_LT_CURRENT [0-9]*)/set(LIBQGPGME_LT_CURRENT $qgpgme_lt_current)/g" \ | |||||
| -e "s/set(LIBQGPGME_LT_AGE [0-9]*)/set(LIBQGPGME_LT_AGE $qgpgme_lt_age)/g" \ | |||||
| -e "s/set(LIBQGPGME_LT_REVISION [0-9]*)/set(LIBQGPGME_LT_REVISION $qgpgme_lt_revision)/g" \ | |||||
| -i lang/qt/CMakeLists.txt | |||||
| No newline at end of file | |||||