summaryrefslogtreecommitdiffstats
path: root/ship
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-12-28 19:09:22 +0100
committermakefu <github@syntax-fehler.de>2013-12-28 19:09:22 +0100
commitc60ff6aa307e4c2eb5928bd34860c7366b765cc0 (patch)
treee32aefb692413bf91843807ef25383819d34eda8 /ship
parentda2a06f7af0047fbb26bb54384ba50285437dc57 (diff)
ship: add fix_dircolors
Diffstat (limited to 'ship')
-rwxr-xr-xship/src/fix_dircolors11
1 files changed, 11 insertions, 0 deletions
diff --git a/ship/src/fix_dircolors b/ship/src/fix_dircolors
new file mode 100755
index 00000000..57229210
--- /dev/null
+++ b/ship/src/fix_dircolors
@@ -0,0 +1,11 @@
+#!/bin/sh
+#@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;35/' $HOME/.dircolors
+! grep -q 'dircolors' $HOME/.profile && \
+ info "adding dircolors line to $HOME/.profile" && \
+ echo 'eval `dircolors -b $HOME/.dircolors`' >> $HOME/.profile
+info "done"