Skip to content

Commit

Permalink
Add set alternatives error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyMatt committed Jul 21, 2024
1 parent 66c6323 commit 883af9d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions set_alternatives.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#! /bin/bash

set -e

LLVM_VERSION=$1
if [ -z "$LLVM_VERSION" ]; then
echo "Usage: $0 <llvm_version>"
exit 1
fi

update-alternatives --install /usr/bin/clang clang "/usr/bin/clang-${LLVM_VERSION}" 100
update-alternatives --install /usr/bin/clang++ clang++ "/usr/bin/clang++-${LLVM_VERSION}" 100
Expand Down

0 comments on commit 883af9d

Please sign in to comment.