aboutsummaryrefslogtreecommitdiffstats
path: root/rustc/rustc.install
diff options
context:
space:
mode:
Diffstat (limited to 'rustc/rustc.install')
-rw-r--r--rustc/rustc.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/rustc/rustc.install b/rustc/rustc.install
new file mode 100644
index 0000000..98437ae
--- /dev/null
+++ b/rustc/rustc.install
@@ -0,0 +1,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
+}