aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2025-05-06 20:46:41 +0300
committerMunyoki Kilyungi2025-05-06 20:46:41 +0300
commit32055ca38c3d2807e58e8718a6de39d37b8ad362 (patch)
treee643bef2434a2f95413ad0004d06075040fc4e45
parentc16600ea5bdf7bab75c7105c173e8351422e9663 (diff)
downloadgn-machines-32055ca38c3d2807e58e8718a6de39d37b8ad362.tar.gz
Make sure that user has the latest guix-channel set up.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xgenenetwork-local-container.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/genenetwork-local-container.sh b/genenetwork-local-container.sh
index 0f873a7..0875625 100755
--- a/genenetwork-local-container.sh
+++ b/genenetwork-local-container.sh
@@ -66,13 +66,21 @@ log() {
}
# Check dependencies
-for cmd in git guix sudo diff cp; do
+for cmd in git guix sudo diff cp grep; do
if ! command -v "$cmd" &>/dev/null; then
log "ERROR" "Required command '$cmd' not found"
exit 1
fi
done
+guix_output=$(guix describe)
+# Check for gn-bioinformatics channel
+echo "$guix_output" | grep -q "gn-bioinformatics"
+if [ $? = 1 ]; then
+ log ERROR "$guix_output"
+ log ERROR "Please make sure your current profile has gn-bioinformatics"
+ exit 1
+fi
# Validate HOME is set
if [ -z "${HOME:-}" ]; then
log "ERROR" "HOME environment variable is not set"