Skip to content

Commit

Permalink
Make etc/ci/describe-system-config.sh POSIX-compliant
Browse files Browse the repository at this point in the history
For alpine
  • Loading branch information
JasonGross committed Nov 10, 2023
1 parent abce041 commit d7b2cc3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions etc/ci/describe-system-config.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
#!/usr/bin/env bash
#!/bin/sh

cd -- "$( dirname -- "${BASH_SOURCE[0]}" )"
cd -- "$( dirname -- "$0" )"
cd ../..

function run() {
run() {
"${SHELL}" -c "$@" || true
}

if [ ! -z "$CI" ]; then
function group() {
group() {
echo "::group::$@"
run "$@"
echo "::endgroup::"
}
else
function group() { run "$@"; }
group() { run "$@"; }
fi

group lscpu
group uname -a
group lsb_release -a
group ulimit -aH
group ulimit -aS
group "cat /etc/os-release"
group "cat /proc/cpuinfo"
group "cat /proc/meminfo"
group "apk info"
group "dpkg -l"
group ghc --version
group gcc --version
group ocamlc -config
Expand All @@ -30,3 +35,4 @@ group coqc --version
group "true | coqtop"
group etc/machine.sh
group "echo PATH=$PATH"
group "echo SHELL=$SHELL"

0 comments on commit d7b2cc3

Please sign in to comment.