From e7e33e7832a806c3a3a1214461acdd7bb257fc1f Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Thu, 18 Mar 2021 08:39:00 -0400 Subject: [PATCH] Lookup currently-used Racket version automatically --- home/lib/login_variables.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/lib/login_variables.sh b/home/lib/login_variables.sh index 862ab0a..1fd515b 100644 --- a/home/lib/login_variables.sh +++ b/home/lib/login_variables.sh @@ -30,8 +30,8 @@ export PATH=$PATH:$HOME/.dotnet/tools export PATH=$PATH:$HOME/.cargo/bin # Racket packages -# WARN: ensure the version is correct -export PATH=$PATH:$HOME/.racket/7.9/bin +RACKET_VERSION=$(racket --version | awk '{for (i=1; i<=NF; i++) {if ($i ~ /^v[0-9]+\.[0-9]+/) {sub("^v", "", $i); print $i; exit 0}}}') +export PATH=$PATH:$HOME/.racket/"$RACKET_VERSION"/bin # Gambit Scheme export PATH=$PATH:/usr/local/Gambit/bin -- 2.20.1