2020-02-10 19:58:35 +01:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
#
|
|
|
|
|
|
|
|
lscolors_data_dir="${XDG_DATA_HOME:-$HOME/.local/share}"
|
|
|
|
|
|
|
|
if dircolors -b LS_COLORS > lscolors.sh && dircolors -c LS_COLORS > lscolors.csh ; then
|
|
|
|
if mv -t "$lscolors_data_dir" lscolors.sh lscolors.csh ; then
|
|
|
|
cat <<EOF
|
|
|
|
To enable the colors, add the following line to your shell's start-up script:
|
|
|
|
|
|
|
|
For Bourne shell (e.g. ~/.bashrc or ~/.zshrc):
|
2020-04-09 16:27:27 +02:00
|
|
|
. "$lscolors_data_dir/lscolors.sh"
|
2020-02-10 19:58:35 +01:00
|
|
|
|
|
|
|
For C shell (e.g. ~/.cshrc):
|
2020-04-09 16:27:27 +02:00
|
|
|
. "$lscolors_data_dir/lscolors.csh"
|
2020-02-10 19:58:35 +01:00
|
|
|
|
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
fi
|