I would like to install something from github in a bash script but I try to verify if the folder exists or not:
BLUE "Installing LS_COLORS..."
if [ ! -d "~/opt/LS_COLORS" ]
then
git clone https://github.com/trapd00r/LS_COLORS.git ~/opt/LS_COLORS && cd ~/opt/LS_COLORS
cat lscolors.sh >> ~/.bashrc
source ~/.bashrc
else
GREEN "LS_COLORS already installed"
fi
The problem is that the LS_COLORS dir does not empty and this is not working properly. I can not get into the else part.