Commit Graph

10 Commits

Author SHA1 Message Date
Denis 'GNUtoo' Carikli b175bd85a5
Add topdir ./configure.
The goal here is to be able to add configure options later on.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2024-05-12 22:56:04 +02:00
Denis 'GNUtoo' Carikli 34007c4baf
scripts: misc: guix.sh: make it pass shellcheck.
Without this fix, running shellcheck -x on
resources/scripts/misc/guix.sh returns many errors.

For each guix version declaration we have something like that:
    In resources/scripts/misc/guix.sh line 21:
    guix_v0_0="6365068393254e1131ab80eb0d68a759e7fd2256"
    ^-------^ SC2034 (warning): guix_v0_0 appears unused.
    Verify use (or export if used externally).
and here the variables are actually used in this code:
    guix_version_commit()
    {
        version="$1"

        eval echo "$(echo \$guix_"${version}" | sed 's#\.#_#g')"
    }
so we workaround by disabling that test for each version declaration.

Then shellcheck cannot find "$GUIX_PROFILE"/etc/profile:
In resources/scripts/misc/guix.sh line 91:
        . "$GUIX_PROFILE"/etc/profile
          ^-------------------------^ SC1091 (info):
   Not following: ./etc/profile: openBinaryFile:
   does not exist (No such file or directory)
so we disabled that test for this line.

After that we have many issues with quoting like this one:
    In resources/scripts/misc/guix.sh line 104:
        eval echo $(echo \$guix_"${version}" | sed 's#\.#_#g')
                  ^-- SC2046 (warning):
                  Quote this to prevent word splitting.
or this one:
    In resources/scripts/misc/guix.sh line 233:
        major="$(echo ${version} | awk -F . '{print $1}')"
                      ^--------^ SC2086 (info):
                      Double quote to prevent globbing and word splitting.
these were fixed.

We also improved a test by using grep -q:
    In resources/scripts/misc/guix.sh line 272:
        elif [ -n "$(echo ${revision} | grep '\.')" ] ; then
               ^-- SC2143 (style):
        Use grep -q instead of comparing output with [ -n .. ]

And finally in guix_version_commit a sed was avoided by using bash
replacement, and when that was not possible (in guix_next_version),
the shellcheck test for that was disabled.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2024-05-12 22:56:04 +02:00
Denis 'GNUtoo' Carikli b3a0ddd92c
scripts: misc: guix.sh: fix last version detection.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2024-05-12 22:55:33 +02:00
Denis 'GNUtoo' Carikli 4672e02a45
scripts: misc: guix.sh: fix forgetten tab.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2024-04-30 12:12:44 +02:00
Denis 'GNUtoo' Carikli 8212861d88
scripts: misc: guix.sh: fix typo.
After installing Guix with the following command on PureOS 10
(byzantium) with the following command:
    $ sudo pkcon -y --allow-reinstall install guix
we have:
    $ ./resources/dependencies/guix
    ./resources/dependencies/guix: 91: .:
    cannot open [$HOME]/.config/guix/current/etc/profile: No such file

This should fix it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-09 15:59:50 +01:00
Denis 'GNUtoo' Carikli 3ad9ba11f4
dependencies: Add script to update Guix.
The website-build code already uses guix by default. Given that it
also requires a specific Guix revision to workaround an issues with
pandoc, it's a good idea to help users easily install Guix.

PureOS Byzantium has a package for Guix 1.2.0, so if users install
that they will need to update it at least to Guix 1.4.0 to have the
same Guix commands.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
2023-12-06 17:32:51 +01:00
Denis 'GNUtoo' Carikli 57050c2985
build: improve help.
This commit corrects linelength (this should have no functional impact)
and adds exit codes (sysexit.sh)

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
neox: wrote the commit message
2023-12-06 17:30:41 +01:00
John Doe acc57bda6d scripts: process git versions when lbmk is a worktree or submodule
git worktrees have plaintext .git files which contain the gitdir in their content.
2022-03-04 14:14:05 -05:00
Ron Nazarov 0fadeed493 replace #!/bin/bash with #!/usr/bin/env bash 2021-06-03 12:47:08 +01:00
Leah Rowe 89517ed6b9 libreboot!
this is forked from the "libre" branch in osboot, which is itself a libre,
deblobbed fork of osboot, a blobbed up fork of libreboot

libreboot needed to be purged clean. this is the new libreboot development
repository. the old one has been abandoned
2021-05-18 13:56:12 +01:00