this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add install script

onevcat 1bcb9ea4 c4b7a0ea

+86
+86
scripts/install.sh
··· 1 + #!/bin/bash 2 + # Install axe to a specified location or default ~/.local/axe 3 + 4 + set -e 5 + 6 + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" 7 + PROJECT_DIR="$(dirname "$SCRIPT_DIR")" 8 + BUILD_PRODUCTS="${PROJECT_DIR}/build_products" 9 + 10 + # Default installation directory 11 + INSTALL_DIR="${1:-$HOME/.local/axe}" 12 + BIN_DIR="${2:-$HOME/.local/bin}" 13 + 14 + # Colors for output 15 + RED='\033[0;31m' 16 + GREEN='\033[0;32m' 17 + YELLOW='\033[1;33m' 18 + NC='\033[0m' # No Color 19 + 20 + echo "๐Ÿ”ง AXe Installer" 21 + echo "================" 22 + echo "" 23 + 24 + # Check if build products exist 25 + if [[ ! -f "${BUILD_PRODUCTS}/axe" ]]; then 26 + echo -e "${RED}Error: axe executable not found at ${BUILD_PRODUCTS}/axe${NC}" 27 + echo "Please run './scripts/build.sh' first or 'swift build -c release'" 28 + exit 1 29 + fi 30 + 31 + if [[ ! -d "${BUILD_PRODUCTS}/Frameworks" ]]; then 32 + echo -e "${RED}Error: Frameworks directory not found at ${BUILD_PRODUCTS}/Frameworks${NC}" 33 + echo "Please run './scripts/build.sh' first" 34 + exit 1 35 + fi 36 + 37 + echo "Installation directory: ${INSTALL_DIR}" 38 + echo "Binary symlink: ${BIN_DIR}/axe" 39 + echo "" 40 + 41 + # Create directories 42 + echo "๐Ÿ“ Creating directories..." 43 + mkdir -p "${INSTALL_DIR}" 44 + mkdir -p "${BIN_DIR}" 45 + 46 + # Copy executable 47 + echo "๐Ÿ“ฆ Copying axe executable..." 48 + cp "${BUILD_PRODUCTS}/axe" "${INSTALL_DIR}/axe" 49 + chmod +x "${INSTALL_DIR}/axe" 50 + 51 + # Copy frameworks 52 + echo "๐Ÿ“ฆ Copying Frameworks..." 53 + rm -rf "${INSTALL_DIR}/Frameworks" 54 + cp -R "${BUILD_PRODUCTS}/Frameworks" "${INSTALL_DIR}/Frameworks" 55 + 56 + # Create symlink 57 + echo "๐Ÿ”— Creating symlink in ${BIN_DIR}..." 58 + rm -f "${BIN_DIR}/axe" 59 + ln -sf "${INSTALL_DIR}/axe" "${BIN_DIR}/axe" 60 + 61 + # Verify installation 62 + echo "" 63 + echo "โœ… Installation complete!" 64 + echo "" 65 + echo "Directory structure:" 66 + echo " ${INSTALL_DIR}/" 67 + echo " โ”œโ”€โ”€ axe" 68 + echo " โ””โ”€โ”€ Frameworks/" 69 + ls "${INSTALL_DIR}/Frameworks" | sed 's/^/ โ”œโ”€โ”€ /' 70 + echo "" 71 + echo "Symlink:" 72 + echo " ${BIN_DIR}/axe -> ${INSTALL_DIR}/axe" 73 + echo "" 74 + 75 + # Test if it works 76 + if command -v axe &> /dev/null; then 77 + echo "๐ŸŽ‰ axe is now available in your PATH!" 78 + echo "" 79 + axe --version 2>/dev/null || echo "(run 'axe --help' to get started)" 80 + else 81 + echo -e "${YELLOW}Note: ${BIN_DIR} may not be in your PATH${NC}" 82 + echo "Add this to your shell config (~/.zshrc or ~/.bashrc):" 83 + echo "" 84 + echo " export PATH=\"\$HOME/.local/bin:\$PATH\"" 85 + echo "" 86 + fi