Remove check for cloning dotfiles

This commit is contained in:
2025-06-23 00:01:14 +01:00
committed by GitHub
parent a861fde934
commit 678439a2e9

View File

@@ -77,31 +77,28 @@ install_gnome_extension() {
} }
# Clone Dotfiles if not already present # Clone Dotfiles if not already present
if [ $W_MAIN = "install" ]; then cd "$HOME/dotfiles"
cd "$HOME/dotfiles" if [ "$(pwd)" != "$HOME/dotfiles" ]; then
if [ "$(pwd)" != "$HOME/dotfiles" ]; then echo "${YELLOW}Cloning dotfiles repository...${NC}"
echo "${YELLOW}Cloning dotfiles repository...${NC}" sudo apt update
sudo apt update sudo apt install -y git
sudo apt install -y git if ! git clone https://github.com/TrudeEH/dotfiles --depth 1; then
if ! git clone https://github.com/TrudeEH/dotfiles --depth 1; then echo "${RED}Error cloning dotfiles repository. Exiting...${NC}"
echo "${RED}Error cloning dotfiles repository. Exiting...${NC}" exit 2
exit 2
fi
cd dotfiles || exit
echo "${GREEN}dotfiles repository cloned successfully.${NC}"
else
echo "${YELLOW}Updating dotfiles repository...${NC}"
pull_output=$(git pull)
echo "$pull_output"
if ! echo "$pull_output" | grep -q "Already up to date."; then
echo "${YELLOW}Changes detected. Re-running script...${NC}"
exec "$0" "$@"
fi
fi fi
cd dotfiles || exit
echo "${GREEN}dotfiles repository cloned successfully.${NC}"
else else
cd "$HOME/dotfiles" || exit echo "${YELLOW}Updating dotfiles repository...${NC}"
pull_output=$(git pull)
echo "$pull_output"
if ! echo "$pull_output" | grep -q "Already up to date."; then
echo "${YELLOW}Changes detected. Re-running script...${NC}"
exec "$0" "$@"
fi
fi fi
mkdir -p "$HOME/dotfiles/logs" mkdir -p "$HOME/dotfiles/logs"
if [ $W_MAIN = "install" ]; then if [ $W_MAIN = "install" ]; then