fixed problems in the mybash arch install script I made

This commit is contained in:
fearlessgeekmedia
2022-10-28 13:09:08 -04:00
parent fb4c133cff
commit 258e1504e5

View File

@@ -14,24 +14,31 @@ checkEnv(){
fi
## Check for requirements.
REQUIREMENTS='curl yay groups sudo'
REQUIREMENTS='curl yay sudo'
if ! which ${REQUIREMENTS}>/dev/null;then
echo -e "${RED}To run me,https://github.com/fearlessgeekmedia/mybash you need: ${REQUIREMENTS}${RC}"
exit 1
fi
## Check if member of the sudo group.
## Check if member of the wheel group.
if ! groups|grep wheel>/dev/null;then
echo -e "${RED}You need to be a member of the sudo wheel to run me!"
echo -e "${RED}You need to be a member of the wheel to run me!"
exit 1
fi
}
installDepend(){
## Check for dependencies.
DEPENDENCIES='autojump bash bash-completion'
# For some reason, if I put autojump in the original DEPENCENCIES variable,
# it skips the installation and just does bash and bash completion. So I
# put autojump in a separate variable and separate yay command.
DEPENDENCIES1='bash bash-completion'
DEPENDENCIES2='autojump'
echo -e "${YELLOW}Installing dependencies...${RC}"
sudo yay -S ${DEPENDENCIES}
yay -S ${DEPENDENCIES1}
yay -S ${DEPENDENCIES2}
sudo mkdir /usr/local/bin/autojump
sudo ln -s /etc/profile.d/autojump.sh /usr/share/autojump/autojump.sh
}
installStarship(){