aboutsummaryrefslogtreecommitdiff
path: root/contrib/guix/guix-build.sh
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-12-21 13:53:46 -0500
committerCarl Dong <contact@carldong.me>2021-01-08 11:40:01 -0500
commit57f95331464f097261c63fd1b6040536c58a03fa (patch)
tree788373384526f98c4749f89a0970e8231db6c079 /contrib/guix/guix-build.sh
parent38b7b2ed72b1f0f57bd9800c7fbb7b7c98a20ed0 (diff)
guix: Add section headings to guix-build.sh
Diffstat (limited to 'contrib/guix/guix-build.sh')
-rwxr-xr-xcontrib/guix/guix-build.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/guix/guix-build.sh b/contrib/guix/guix-build.sh
index e268a8b996..b956be6579 100755
--- a/contrib/guix/guix-build.sh
+++ b/contrib/guix/guix-build.sh
@@ -2,6 +2,10 @@
export LC_ALL=C
set -e -o pipefail
+###################
+## Sanity Checks ##
+###################
+
# GUIX_BUILD_OPTIONS is an environment variable recognized by guix commands that
# can perform builds. This seems like what we want instead of
# ADDITIONAL_GUIX_COMMON_FLAGS, but the value of GUIX_BUILD_OPTIONS is actually
@@ -26,6 +30,10 @@ EOF
exit 1
fi
+#########
+# Setup #
+#########
+
# Determine the maximum number of jobs to run simultaneously (overridable by
# environment)
MAX_JOBS="${MAX_JOBS:-$(nproc)}"
@@ -49,6 +57,10 @@ time-machine() {
-- "$@"
}
+#########
+# Build #
+#########
+
# Function to be called when building for host ${1} and the user interrupts the
# build
int_trap() {