From 78bd5d62ff32a40f97a19f69715d3ce76c4779fd Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Sun, 18 Jun 2023 18:27:56 +0200 Subject: [PATCH] =?UTF-8?q?Remaniement=20:=20s=C3=A9paration=20en=20plusie?= =?UTF-8?q?urs=20fichiers=20des=20configurations=20syst=C3=A8me=20de=20bas?= =?UTF-8?q?h=20pour=20=C3=A9viter=20la=20redondance=20du=20code?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ahurac-ahrc-laptop.bashrc => ahrc-laptop.bashrc} | 9 --------- .../bashrc.d/{ahurac-ahrc-pc.bashrc => ahrc-pc.bashrc} | 9 --------- etc/bash/bashrc.d/ahurac.bashrc | 7 +++++++ 3 files changed, 7 insertions(+), 18 deletions(-) rename etc/bash/bashrc.d/{ahurac-ahrc-laptop.bashrc => ahrc-laptop.bashrc} (68%) rename etc/bash/bashrc.d/{ahurac-ahrc-pc.bashrc => ahrc-pc.bashrc} (68%) create mode 100644 etc/bash/bashrc.d/ahurac.bashrc diff --git a/etc/bash/bashrc.d/ahurac-ahrc-laptop.bashrc b/etc/bash/bashrc.d/ahrc-laptop.bashrc similarity index 68% rename from etc/bash/bashrc.d/ahurac-ahrc-laptop.bashrc rename to etc/bash/bashrc.d/ahrc-laptop.bashrc index ce5ebb3..69356c3 100644 --- a/etc/bash/bashrc.d/ahurac-ahrc-laptop.bashrc +++ b/etc/bash/bashrc.d/ahrc-laptop.bashrc @@ -1,5 +1,3 @@ -# Lines added by ahurac - # PS1 if [ "$(id -u)" -eq 0 ]; then ps1_color_1=1 @@ -10,10 +8,3 @@ else fi export PS1="(\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\])\\$ \[$(tput sgr0)\]" -shrc_d=/usr/local/etc/sh/shrc.d -if [ -d "$shrc_d" ]; then - for i in "${shrc_d}/"*; do - . "$i" - done -fi - diff --git a/etc/bash/bashrc.d/ahurac-ahrc-pc.bashrc b/etc/bash/bashrc.d/ahrc-pc.bashrc similarity index 68% rename from etc/bash/bashrc.d/ahurac-ahrc-pc.bashrc rename to etc/bash/bashrc.d/ahrc-pc.bashrc index 950de36..48ca71f 100644 --- a/etc/bash/bashrc.d/ahurac-ahrc-pc.bashrc +++ b/etc/bash/bashrc.d/ahrc-pc.bashrc @@ -1,5 +1,3 @@ -# Lines added by ahurac - # PS1 if [ "$(id -u)" -eq 0 ]; then ps1_color_1=1 @@ -10,10 +8,3 @@ else fi export PS1="[\[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_1}m\]\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[$(tput bold)\]\[\033[38;5;${ps1_color_2}m\]\W\[$(tput sgr0)\]]\\$ \[$(tput sgr0)\]" -shrc_d=/usr/local/etc/sh/shrc.d -if [ -d "$shrc_d" ]; then - for i in "${shrc_d}/"*; do - . "$i" - done -fi - diff --git a/etc/bash/bashrc.d/ahurac.bashrc b/etc/bash/bashrc.d/ahurac.bashrc new file mode 100644 index 0000000..9cc867e --- /dev/null +++ b/etc/bash/bashrc.d/ahurac.bashrc @@ -0,0 +1,7 @@ +shrc_d=/usr/local/etc/sh/shrc.d +if [ -d "$shrc_d" ]; then + for i in "${shrc_d}/"*; do + . "$i" + done +fi +