Lookup currently-used Racket version automatically
authorSiraaj Khandkar <siraaj@khandkar.net>
Thu, 18 Mar 2021 12:39:00 +0000 (08:39 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Thu, 18 Mar 2021 12:39:00 +0000 (08:39 -0400)
home/lib/login_variables.sh

index 862ab0a..1fd515b 100644 (file)
@@ -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
This page took 0.030903 seconds and 4 git commands to generate.