summaryrefslogtreecommitdiffstats
path: root/ship/src/fix_dircolors
diff options
context:
space:
mode:
Diffstat (limited to 'ship/src/fix_dircolors')
-rwxr-xr-xship/src/fix_dircolors13
1 files changed, 13 insertions, 0 deletions
diff --git a/ship/src/fix_dircolors b/ship/src/fix_dircolors
new file mode 100755
index 00000000..d427563f
--- /dev/null
+++ b/ship/src/fix_dircolors
@@ -0,0 +1,13 @@
+#!/bin/sh
+#@info
+#@strict
+#@include core
+exists dircolors || die "no dircolors in PATH, bailing out"
+
+info "fixing dircolors for $(id -un)"
+dircolors -p > $HOME/.dircolors
+sed -i 's/\(DIR \).*/\101;36/' $HOME/.dircolors
+! grep -q 'dircolors' $HOME/.profile && \
+ info "adding dircolors line to $HOME/.profile" && \
+ echo 'eval `dircolors -b $HOME/.dircolors`' >> $HOME/.profile
+info "done"