diff options
author | Sam Bingner <sam@bingner.com> | 2019-03-05 10:47:43 -1000 |
---|---|---|
committer | Sam Bingner <sam@bingner.com> | 2019-03-05 10:47:43 -1000 |
commit | 27d665d845871c90ff36fde6bd2806efaf7f96ab (patch) | |
tree | 67fd827b19a5ec89eef99bf5c6ceccd33cdbf5a4 /data/llvm-clang/_metadata/postinst | |
parent | cd6133182a3abdf20b35f850eee5037c267cedcc (diff) |
Add symlinks for llvm utilities
Diffstat (limited to 'data/llvm-clang/_metadata/postinst')
-rwxr-xr-x | data/llvm-clang/_metadata/postinst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/data/llvm-clang/_metadata/postinst b/data/llvm-clang/_metadata/postinst new file mode 100755 index 000000000..bebc210cd --- /dev/null +++ b/data/llvm-clang/_metadata/postinst @@ -0,0 +1,22 @@ +#!/bin/bash +LLVMPROGS="ar as bcanalyzer cxxdump cxxfilt diff dlltool dsymutil dwarfdump nm objdump pdbutil profdata ranlib readelf readobj size split strings" + +case "$1" in + configure) + for prog in ${LLVMPROGS}; do + update-alternatives --quiet --install /usr/bin/${prog} ${prog} /usr/bin/llvm-${prog} 50 + done + update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/clang 50 + update-alternatives --quiet --install /usr/bin/cpp cpp /usr/bin/clang-cpp 50 + update-alternatives --quiet --install /usr/bin/g++ g++ /usr/bin/clang++ 50 + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac |