mirror of
https://github.com/JaKooLit/Debian-Hyprland.git
synced 2025-12-21 18:20:13 +01:00
added initial shell check first if zsh already inorder to skip changing to zsh
This commit is contained in:
parent
700a74e42e
commit
ccc33181e2
@ -70,13 +70,20 @@ if command -v zsh >/dev/null; then
|
|||||||
cp -r 'assets/.zshrc' ~/
|
cp -r 'assets/.zshrc' ~/
|
||||||
cp -r 'assets/.zprofile' ~/
|
cp -r 'assets/.zprofile' ~/
|
||||||
|
|
||||||
printf "${NOTE} Changing default shell to ${MAGENTA}zsh${RESET}..."
|
# Check if the current shell is zsh
|
||||||
printf "\n%.0s" {1..2}
|
if [[ "$SHELL" != *"zsh"* ]]; then
|
||||||
while ! chsh -s $(which zsh); do
|
printf "${NOTE} Changing default shell to ${MAGENTA}zsh${RESET}..."
|
||||||
|
printf "\n%.0s" {1..2}
|
||||||
|
|
||||||
|
while ! chsh -s $(which zsh); do
|
||||||
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
|
echo "${ERROR} Authentication failed. Please enter the correct password." 2>&1 | tee -a "$LOG"
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
printf "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
|
|
||||||
|
printf "${INFO} Shell changed successfully to ${MAGENTA}zsh${RESET}" 2>&1 | tee -a "$LOG"
|
||||||
|
else
|
||||||
|
echo "${NOTE}Your shell is already set to ${MAGENTA}zsh${RESET}."
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user