This commit is contained in:
bruno 2023-07-26 10:35:31 -04:00
parent fc801c31ec
commit 9b556fc333
1 changed files with 32 additions and 24 deletions

View File

@ -127,12 +127,19 @@ installSoftware() {
fi
}
# Fonction permettant de déterminer le shell courant
setPATHCurrentShell(){
CurrentShell = $(echo $SHELL | awk -F/ '{print $NF}')
info "===> Shell courant : $CurrentShell"
# vérifier que ~/.config/scut/ est dans la variable PATH
if [[ $PATH == *~/.config/scut/* ]]; then
warn "===> ~/.config/scut/ est déjà dans la variable PATH"
else
# si le shell est bash
if [ "$CurrentShell" == "bash" ]; then
@ -162,6 +169,7 @@ setPATHCurrentShell(){
error "!! => Veuillez ajouter le path ~/.config/scut/ à votre variable PATH manuellement."
error "!! => les shells supportés sont : bash, zsh, fish et NuShell."
fi
fi
}