-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset-alternatives.sh
executable file
·111 lines (109 loc) · 1.66 KB
/
set-alternatives.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/bin/bash
PROGS=(
asan_symbolize
bugpoint
clang++
clang
clang-cpp
clangd
count
dsymutil
FileCheck
ld64.lld
ld.lld
llc
lld
lldb
lldb-argdumper
lldb-instr
lldb-server
lldb-vscode
lld-link
lli
lli-child-target
llvm-addr2line
llvm-ar
llvm-as
llvm-bcanalyzer
llvm-bitcode-strip
llvm-cat
llvm-cfi-verify
llvm-config
llvm-cov
llvm-c-test
llvm-cvtres
llvm-cxxdump
llvm-cxxfilt
llvm-cxxmap
llvm-debuginfod
llvm-debuginfod-find
llvm-diff
llvm-dis
llvm-dlltool
llvm-dwarfdump
llvm-dwarfutil
llvm-dwp
llvm-exegesis
llvm-extract
llvm-gsymutil
llvm-ifs
llvm-install-name-tool
llvm-jitlink
llvm-jitlink-executor
llvm-lib
llvm-libtool-darwin
llvm-link
llvm-lipo
llvm-lto
llvm-lto2
llvm-mc
llvm-mca
llvm-ml
llvm-modextract
llvm-mt
llvm-nm
llvm-objcopy
llvm-objdump
llvm-opt-report
llvm-otool
llvm-pdbutil
llvm-PerfectShuffle
llvm-profdata
llvm-profgen
llvm-ranlib
llvm-rc
llvm-readelf
llvm-readobj
llvm-reduce
llvm-remark-size-diff
llvm-rtdyld
llvm-sim
llvm-size
llvm-split
llvm-stress
llvm-strings
llvm-strip
llvm-symbolizer
llvm-tapi-diff
llvm-tblgen
llvm-tli-checker
llvm-undname
llvm-windres
llvm-xray
not
obj2yaml
opt
sanstats
split-file
UnicodeNameMappingGenerator
verify-uselistorder
wasm-ld
yaml2obj
yaml-bench
)
for PROG in "${PROGS[@]}"; do
PPATH=$(which "${PROG}" || printf "/usr/bin/${PROG}")
PPATH15=$(which "${PROG}-15")
echo "Updating alternative ${PPATH}=${PPATH15}"
sudo update-alternatives --install "${PPATH}" "${PROG}" "${PPATH15}" 100 || echo "Failed to install ${PROG}"
done