Created
March 3, 2023 02:50
-
-
Save vegertar/f22392e5932bffb81b5f584533dce3f7 to your computer and use it in GitHub Desktop.
Choose a default clang from multiple versions in DragonFlyBSD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
basedir=`dirname $0` | |
version=${1:-14} | |
dirname=/usr/local/bin/ | |
run() { | |
echo $@ | |
$@ | |
} | |
for item in `pkg info -l llvm${version} | grep "${dirname}.*${version}$"`; do | |
a=${item##$dirname} | |
b=${a%$version} | |
run ln -sf $item ${basedir}/${b} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment