summaryrefslogtreecommitdiff
path: root/data/llvm-clang/_metadata/postinst
blob: bebc210cd2ed5fe80d8310536c72496df7790ad4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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