#!/bin/bash #=============================================================================== # POSCOM Claude v2.0.0 - Quick Installer #=============================================================================== # Usage: curl -fsSL https://epiccos.iug.net/install-poscom.sh | sudo bash #=============================================================================== set -euo pipefail VERSION="2.0.0" DOWNLOAD_URL="https://epiccos.iug.net/posagents.zip" INSTALL_DIR="/tmp/poscom-install-$$" LOG_FILE="/tmp/poscom-install-$(date +%Y%m%d-%H%M%S).log" # Colors RED='\033[0;31m' GREEN='\033[0;32m' YELLOW='\033[1;33m' CYAN='\033[0;36m' NC='\033[0m' log() { echo "[$(date +'%H:%M:%S')] $*" >> "$LOG_FILE"; } error_exit() { echo -e "${RED}ERROR: $1${NC}" >&2 log "ERROR: $1" echo -e "${YELLOW}Log: $LOG_FILE${NC}" exit 1 } echo -e "${CYAN}" echo "╔══════════════════════════════════════════════════════════════════╗" echo "║ POSCOM CLAUDE v${VERSION} - QUICK INSTALLER ║" echo "║ 77 AI Agents for POS/Retail/Odoo Development ║" echo "╚══════════════════════════════════════════════════════════════════╝" echo -e "${NC}" # Check root if [ "$EUID" -ne 0 ]; then error_exit "Please run as root: curl -fsSL https://epiccos.iug.net/install-poscom.sh | sudo bash" fi # Check dependencies for cmd in curl unzip; do if ! command -v $cmd &>/dev/null; then echo -e "${YELLOW}Installing $cmd...${NC}" apt-get update -qq && apt-get install -y -qq $cmd 2>/dev/null || \ dnf install -y -q $cmd 2>/dev/null || \ yum install -y -q $cmd 2>/dev/null || \ error_exit "Failed to install $cmd" fi done # Create temp directory mkdir -p "$INSTALL_DIR" cd "$INSTALL_DIR" # Download echo -e "${CYAN}[1/3] Downloading POSCOM Claude v${VERSION}...${NC}" curl -fsSL "$DOWNLOAD_URL" -o posagents.zip || error_exit "Download failed" echo -e "${GREEN}✓ Downloaded${NC}" # Extract echo -e "${CYAN}[2/3] Extracting...${NC}" unzip -q posagents.zip || error_exit "Extraction failed" echo -e "${GREEN}✓ Extracted${NC}" # Run installer echo -e "${CYAN}[3/3] Running installer...${NC}" if [ -f "bootstrap.sh" ]; then chmod +x bootstrap.sh ./bootstrap.sh elif [ -f "deploy.sh" ]; then chmod +x deploy.sh ./deploy.sh else error_exit "No installer script found" fi # Cleanup cd / rm -rf "$INSTALL_DIR" echo -e "${GREEN}Installation complete!${NC}"