Homebrew tap for XR (VR/AR/MR) software.
homebrew vr linux oci
1
fork

Configure Feed

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

Create easy setup script

+91
+91
scripts/setup.sh
··· 1 + #!/usr/bin/bash 2 + # SPDX-License-Identifier: AGPL-3.0-only 3 + # Copyright (c) 2026 MatrixFurry <matrix@matrixfurry.com> 4 + 5 + set -euo pipefail 6 + 7 + TAP_NAME="matrixfurry.com/xr" 8 + TAP_URL="https://tangled.org/matrixfurry.com/homebrew-xr" 9 + 10 + info() { printf '\e[0;34m[INFO]\e[0m %s\n' "$*"; } 11 + warn() { printf '\e[0;33m[WARNING]\e[0m %s\n' "$*"; } 12 + error() { printf '\e[0;31m[ERROR]\e[0m %s\n' "$*"; } 13 + fatal() { printf '\e[0;31m[FATAL]\e[0m %s\n' "$*"; exit 1; } 14 + success() { printf '\e[0;32m[SUCCESS]\e[0m %s\n' "$*"; } 15 + 16 + check_cmd() { 17 + local cmd="$1" 18 + 19 + if [[ -z "$cmd" ]]; then 20 + fatal "check_cmd requires a command to check (missing argument)" 21 + fi 22 + 23 + command -v "$cmd" &>/dev/null 24 + } 25 + 26 + brew_env() { 27 + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" 28 + echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bashrc 29 + } 30 + 31 + install_brew() { 32 + if ! check_cmd curl; then 33 + fatal "Curl is required to install Homebrew. Please install curl using your system package manager and try again." 34 + fi 35 + 36 + info "Installing Homebrew" 37 + if ! /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"; then 38 + fatal "Homebrew installation failed. See the output above for details." 39 + fi 40 + 41 + info "Setting up homebrew environment" 42 + if ! brew_env; then 43 + fatal "Failed to set up Homebrew's environment. You may have to manually run the commands shown by the installer above." 44 + fi 45 + 46 + if ! check_cmd brew; then 47 + fatal "Homebrew was installed but is not available on your PATH. You may need to restart your shell, or manually run the commands shown by the installer above." 48 + fi 49 + 50 + success "Successfully installed Homebrew" 51 + } 52 + 53 + add_tap() { 54 + info "Adding Linux VR Tap to Homebrew" 55 + 56 + if ! brew tap $TAP_NAME $TAP_URL; then 57 + fatal "Failed to add Linux VR Tap. Try checking your internet connection first. See the output above for more details." 58 + fi 59 + 60 + success "Successfully added Linux VR Tap" 61 + } 62 + 63 + update_brew() { 64 + info "Updating Homebrew" 65 + if ! brew update; then 66 + warning "Homebrew update failed" 67 + fi 68 + } 69 + 70 + main() { 71 + info "Setting up the Linux VR Homebrew Tap" 72 + 73 + if check_cmd brew; then 74 + info "Homebrew is already installed" 75 + update_brew 76 + else 77 + info "Homebrew is not installed" 78 + install_brew 79 + fi 80 + 81 + if brew tap | grep -qx "$TAP_NAME"; then 82 + info "The Homebrew Tap is already installed" 83 + update_brew 84 + else 85 + add_tap 86 + fi 87 + 88 + success "Done!" 89 + } 90 + 91 + main