Fix sudo
This commit is contained in:
parent
41d0ccea2b
commit
f6d9188810
@ -27,7 +27,7 @@ main() {
|
|||||||
CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
|
CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l)
|
||||||
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
|
if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then
|
||||||
printf "${YELLOW}Zsh is not installed!${NORMAL} Installing zsh\n"
|
printf "${YELLOW}Zsh is not installed!${NORMAL} Installing zsh\n"
|
||||||
apt-get install zsh -y
|
sudo apt-get install zsh -y
|
||||||
fi
|
fi
|
||||||
unset CHECK_ZSH_INSTALLED
|
unset CHECK_ZSH_INSTALLED
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ main() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n"
|
printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n"
|
||||||
apt-get install -y fonts-powerline
|
sudo apt-get install -y fonts-powerline
|
||||||
|
|
||||||
# Prevent the cloned repository from having insecure permissions. Failing to do
|
# Prevent the cloned repository from having insecure permissions. Failing to do
|
||||||
# so causes compinit() calls to fail with "command not found: compdef" errors
|
# so causes compinit() calls to fail with "command not found: compdef" errors
|
||||||
@ -116,9 +116,4 @@ main() {
|
|||||||
env zsh
|
env zsh
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$EUID" -ne 0 ]
|
|
||||||
then echo "Please run as root"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
main
|
main
|
||||||
|
Loading…
Reference in New Issue
Block a user