aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMunyoki Kilyungi2025-05-06 21:37:59 +0300
committerMunyoki Kilyungi2025-05-06 21:37:59 +0300
commit034cb3858ad0eb8d3f576ae3904391c48ba37ae8 (patch)
tree6d7eeacfa44e2b0fa5c50f0bf4bc5bcb54dc8eee
parent3020472f1d6cd0ce909a245631c465acfcc308ba (diff)
downloadgn-machines-034cb3858ad0eb8d3f576ae3904391c48ba37ae8.tar.gz
Verify that the profile has the guix-bioinformatic channel.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
-rwxr-xr-xgenenetwork-local-container.sh9
1 files changed, 2 insertions, 7 deletions
diff --git a/genenetwork-local-container.sh b/genenetwork-local-container.sh
index 0875625..8e599e4 100755
--- a/genenetwork-local-container.sh
+++ b/genenetwork-local-container.sh
@@ -73,14 +73,9 @@ for cmd in git guix sudo diff cp grep; do
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
+guix describe | grep gn-bioinformatics &> /dev/null && log "INFO" "guix guix-informatics $(guix describe | grep gn-bioinformatics | cut -d ' ' -f 4)" || log "ERROR" "Please make sure your current profile has gn-bioinformatics"
+
# Validate HOME is set
if [ -z "${HOME:-}" ]; then
log "ERROR" "HOME environment variable is not set"