View previous topic :: View next topic |
Author |
Message |
donald7 Tux's lil' helper
Joined: 03 Mar 2007 Posts: 136
|
Posted: Sun Mar 25, 2007 8:14 pm Post subject: [dispatch-conf] je ne comprends pas ce qu'il faut faire |
|
|
Bonjour
Je viens de faire un emerge -u portage et j'ai une dizaine de fichiers de configuration à revoir
Le problème est que je n'ai aucune idée de ce qu'il faut faire .
Ci après un exemple sur /etc/bash/bashrc : j'avais cru comprendre qu'il fallait chosir entre deux versions du fichier de configuration mais je n'arrive pas à identifier quel est le texte ancien et quel est le texte nouveau.
pourrais t-on me guider ?
merci
donald
Code: | >> q quit, h help, n next, e edit-new, z zap-new, u use-new
--- /etc/bash/bashrc 2006-08-03 17:28:54.000000000 +0200
+++ /etc/bash/._cfg0000_bashrc 2007-03-25 19:55:39.000000000 +0200
@@ -20,27 +20,50 @@
# http://cnswww.cns.cwru.edu/~chet/bash/FAQ (E11)
shopt -s checkwinsize
+# Enable history appending instead of overwriting. #139609
+shopt -s histappend
+
+# Change the window title of X terminals
+case ${TERM} in
+ xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
+ PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\007"'
+ ;;
+ screen)
+ PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HOME/~}\033\\"'
+ ;;
+esac
+
+use_color=false
+
# Set colorful PS1 only on colorful terminals.
# dircolors --print-database uses its own built-in database
# instead of using /etc/DIR_COLORS. Try to use the external file
-# first to take advantage of user additions.
-use_color=false
-safe_term=${TERM//[^[:alnum:]]/.} # sanitize TERM
-
-if [[ -f /etc/DIR_COLORS ]] ; then
- grep -q "^TERM ${safe_term}" /etc/DIR_COLORS && use_color=true
-elif type -p dircolors >/dev/null ; then
- if dircolors --print-database | grep -q "^TERM ${safe_term}" ; then
- use_color=true
- fi
-fi
+# first to take advantage of user additions. Use internal bash
+# globbing instead of external grep binary.
+safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM
+match_lhs=""
+[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)"
+[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(</etc/DIR_COLORS)"
+[[ -z ${match_lhs} ]] \
+ && match_lhs=$(dircolors --print-database)
+[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true
if ${use_color} ; then
+ # Enable colors for ls, etc. Prefer ~/.dir_colors #64489
+ if [[ -f ~/.dir_colors ]] ; then
+ eval $(dircolors -b ~/.dir_colors)
+ elif [[ -f /etc/DIR_COLORS ]] ; then
+ eval $(dircolors -b /etc/DIR_COLORS)
+ fi
+
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
else
PS1='\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] '
fi
+
+ alias ls='ls --color=auto'
+ alias grep='grep --colour=auto'
else
if [[ ${EUID} == 0 ]] ; then
# show root@ when we don't have colors
@@ -51,4 +74,4 @@
fi
# Try to keep environment pollution down, EPA loves us.
-unset use_color safe_term
+unset use_color safe_term match_lhs
>> (2 of 11) -- /etc/bash/bashrc
>> q quit, h help, n next, e edit-new, z zap-new, u use-new
m merge, t toggle-merge, l look-merge |
_________________ Linux Counter #433775
Visitez et contribuez au site gnulinux.fr |
|
Back to top |
|
|
ptah n00b
Joined: 03 Mar 2007 Posts: 65
|
Posted: Sun Mar 25, 2007 8:20 pm Post subject: |
|
|
Salut donald,
Comme tu peux le voir sur les premières ligne de la sortie :
Code: | --- /etc/bash/bashrc 2006-08-03 17:28:54.000000000 +0200
+++ /etc/bash/._cfg0000_bashrc 2007-03-25 19:55:39.000000000 +0200 |
Ce qui signifie donc que les lignes commençant par ++ sont l'update et celles commençant pas -- ton ancienne verison.
Sinon pour tout ce qui est des modification à apporter aux fichiers de configuration, je te conseille d'utiliser toujours la dernière version pour les fichier de configuration que tu n'as jamais touché et de comparer et de merger à ta sauces ceux qui sont plus critiques
My 2 copecs |
|
Back to top |
|
|
babykart Guru
Joined: 08 Oct 2004 Posts: 415
|
|
Back to top |
|
|
davidou2a Guru
Joined: 15 Dec 2006 Posts: 574 Location: Ajaccio
|
Posted: Mon Mar 26, 2007 6:02 pm Post subject: |
|
|
Ah j'allais proposer ce lien ^^ _________________ L'enfer je connais, il s'appelle Windows... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|