aboutsummaryrefslogtreecommitdiffstats
path: root/rustc/rustc.install
blob: 98437ae095f501bfd2e86c342faac14963f1e0ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {

cat >> /etc/ld.so.conf << EOF
/opt/rustc/lib
EOF

ldconfig

cat > /etc/profile.d/rustc.sh << "EOF"
# Begin /etc/profile.d/rustc.sh

pathprepend /opt/rustc/bin           PATH

# End /etc/profile.d/rustc.sh
EOF
}

post_remove() {
sed -i '/rustc/d' /etc/ld.so.conf
ldconfig
rm -rf /etc/profile.d/rustc.sh
}