Files
shell/shell-setup/bootstrap.sh
Peter Wood 52492f9218 Add Docker test scripts for setup validation
- Created run-docker-tests.sh to execute setup tests in isolated Docker containers (Ubuntu and Debian).
- Implemented logging functionality to track test results and errors.
- Added startup.sh to ensure proper permissions and run tests within Docker containers.
- Developed test-setup.sh to validate bootstrap.sh and setup.sh scripts, including package availability checks.
- Enhanced error handling and reporting for package installations and missing dependencies.
- Included detailed logging for system information and test results.
2025-05-12 14:16:03 -04:00

41 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
DOTFILES_REPO="acedanger/shell"
DOTFILES_BRANCH="main"
DOTFILES_DIR="$HOME/shell"
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
NC='\033[0m' # No Color
echo -e "${GREEN}Setting up your system...${NC}"
# Install git if not present
if ! command -v git &>/dev/null; then
echo -e "${YELLOW}Installing git...${NC}"
sudo apt update && sudo apt install -y git
fi
# Create shell directory if it doesn't exist
mkdir -p "$HOME/shell"
# Clone or update repository
if [ -d "$DOTFILES_DIR" ]; then
echo -e "${YELLOW}Updating existing shell repository...${NC}"
cd "$DOTFILES_DIR"
git pull origin $DOTFILES_BRANCH
else
echo -e "${YELLOW}Cloning shell repository...${NC}"
git clone "https://github.com/$DOTFILES_REPO.git" "$DOTFILES_DIR"
cd "$DOTFILES_DIR"
fi
# Make scripts executable
chmod +x "$DOTFILES_DIR/setup/setup.sh"
# Run setup script
"$DOTFILES_DIR/setup/setup.sh"
echo -e "${GREEN}Bootstrap completed! Please restart your terminal for changes to take effect.${NC}"