diff options
| author | Denis 'GNUtoo' Carikli <[email protected]> | 2025-03-27 22:10:26 +0100 |
|---|---|---|
| committer | Adrien 'neox' Bourmault <[email protected]> | 2025-09-22 20:15:52 +0200 |
| commit | 39c70840617d2fd849284919232b0cc09384a96c (patch) | |
| tree | f3d71e046a931b29d049a6c75f2da11aba32cb19 | |
| parent | 28fe74a33581d3b9a72e4cc21036a83b77028712 (diff) | |
| download | gnuboot-main.tar.gz | |
configure.ac, website/configure.ac: unify guix revision declaration.HEADmaingnuboot-next
This enable to have only one declaration of the Guix revision, making
it easier to update it later on.
In addition, moving the declaration outside of configure.ac also make
it easier to reuse it in various other ways or in other configure.ac.
Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
Acked-by: Adrien 'neox' Bourmault <[email protected]>
| -rw-r--r-- | configure.ac | 3 | ||||
| -rwxr-xr-x | guix-revision.sh | 51 | ||||
| -rwxr-xr-x | tests/lint | 1 | ||||
| -rw-r--r-- | website/configure.ac | 7 |
4 files changed, 58 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 6e95ba9f..4d15062f 100644 --- a/configure.ac +++ b/configure.ac @@ -43,7 +43,8 @@ AC_SUBST([XZ_EXTRA_ARGS], []) # to start downloading Guix 1.4.0 packages. So that can make things # a lot faster. -AC_SUBST([GUIX_REVISION], [8e2f32cee982d42a79e53fc1e9aa7b8ff0514714]) +AC_SUBST([GUIX_REVISION], + [`\`dirname $0\`/guix-revision.sh print-variable GUIX_REVISION`]) # --enable-kvm AC_ARG_ENABLE(kvm, diff --git a/guix-revision.sh b/guix-revision.sh new file mode 100755 index 00000000..5d835421 --- /dev/null +++ b/guix-revision.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# Copyright (C) 2025 Denis 'GNUtoo' Carikli <[email protected]> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. + +. "$(dirname "$0")"/resources/scripts/misc/sysexits.sh + +GUIX_REVISION="8e2f32cee982d42a79e53fc1e9aa7b8ff0514714" + +usage() +{ + progname="$1" + + printf "Usage: %s [options]\n" "${progname}" + printf " or: %s print-variable GUIX_REVISION\n" "${progname}" + printf "\n" + printf "Available options:\n" + printf "\t-h, --help\n" + printf "\t\tDisplay this help and exit.\n" +} + +progname="guix-revision.sh" + +if [ $# -eq 1 ] && [ "$1" = "--help" ] ; then + usage "${progname}" + exit "${EX_OK}" +elif [ $# -eq 1 ] && [ "$1" = "-h" ] ; then + usage "${progname}" + exit "${EX_OK}" +elif [ $# -eq 2 ] && [ "$1" = "print-variable" ] ; then + if [ "$2" = "GUIX_REVISION" ] ; then + echo "${GUIX_REVISION}" + else + usage "${progname}" + exit "${EX_USAGE}" + fi +else + usage "${progname}" + exit "${EX_USAGE}" +fi @@ -51,6 +51,7 @@ run_shellcheck \ autogen.sh \ build \ download \ + guix-revision.sh \ modify \ update \ resources/packages/coreboot/distclean \ diff --git a/website/configure.ac b/website/configure.ac index f129db9a..9eb03c3e 100644 --- a/website/configure.ac +++ b/website/configure.ac @@ -17,9 +17,6 @@ AC_INIT([gnuboot],[0.1],[[email protected]]) AM_INIT_AUTOMAKE([foreign]) AC_CONFIG_FILES([Makefile]) -# Use the same revision than ../configure.ac -AC_SUBST([GUIX_REVISION], [8e2f32cee982d42a79e53fc1e9aa7b8ff0514714]) - AC_SUBST([LIGHTTPD_PORT], []) AC_SUBST([RSYNC_DESTINATION], []) AC_SUBST([UNTITLED_PATH], []) @@ -34,6 +31,10 @@ AC_ARG_ENABLE(guix, [guix="yes"]) AM_CONDITIONAL( [WANT_GUIX], [test x"$guix" = x"yes"]) +# Use the same revision than ../configure.ac +AC_SUBST([GUIX_REVISION], + [`\`dirname $0\`/../guix-revision.sh print-variable GUIX_REVISION`]) + # --enable-lighttpd AC_ARG_ENABLE(lighttpd, [AS_HELP_STRING([--enable-lighttpd], |
