From: Siraaj Khandkar Date: Thu, 18 Mar 2021 12:39:00 +0000 (-0400) Subject: Lookup currently-used Racket version automatically X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=e7e33e7832a806c3a3a1214461acdd7bb257fc1f;p=khome.git Lookup currently-used Racket version automatically --- 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