Rewrite boot.sh as a thin bootstrap for the package install flow
Old boot.sh cloned the repo to ~/.local/share/omarchy and sourced the
checkout's install.sh. The package refactor moves all of that into the
omarchy-installer package, so boot.sh's job shrinks to:
1. Configure /etc/pacman.d/omarchy.conf for the right channel
(stable, edge for OMARCHY_REF=dev, rc for OMARCHY_REF=rc).
Include it from /etc/pacman.conf if not already.
2. pacman -Sy && pacman -S --needed omarchy-installer (depends pull in
omarchy, omarchy-settings, omarchy-limine).
3. exec omarchy-install (shipped by omarchy-installer at /usr/bin/).
The OMARCHY_REPO and clone logic are gone. The install.sh on disk
under /usr/share/omarchy is now the source of truth, and is invoked via
omarchy-install with OMARCHY_INSTALL_MODE=online (default).
OMARCHY_REF=dev/rc still maps to the right pacman channel for testing
pre-release builds.
This commit is contained in:
@@ -1,7 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
# Curl-able Omarchy bootstrap. Configures the omarchy pacman repo on a fresh
|
||||||
|
# Arch system, installs the omarchy-installer package (which pulls omarchy,
|
||||||
|
# omarchy-settings, and omarchy-limine via depends), then hands off to
|
||||||
|
# `omarchy install`.
|
||||||
|
#
|
||||||
|
# Usage:
|
||||||
|
# curl -sSL https://omarchy.org/boot.sh | bash
|
||||||
|
# curl -sSL https://omarchy.org/boot.sh | OMARCHY_REF=dev bash
|
||||||
|
|
||||||
# Set install mode to online since boot.sh is used for curl installations
|
set -e
|
||||||
export OMARCHY_ONLINE_INSTALL=true
|
|
||||||
|
|
||||||
ansi_art=' ▄▄▄
|
ansi_art=' ▄▄▄
|
||||||
▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄
|
▄█████▄ ▄███████████▄ ▄███████ ▄███████ ▄███████ ▄█ █▄ ▄█ █▄
|
||||||
@@ -13,38 +20,32 @@ ansi_art=' ▄▄▄
|
|||||||
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███
|
||||||
▀█████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ███████▀ ███ █▀ ▀█████▀
|
▀█████▀ ▀█ ███ █▀ ███ █▀ ███ ███ ███████▀ ███ █▀ ▀█████▀
|
||||||
███ █▀ '
|
███ █▀ '
|
||||||
|
|
||||||
clear
|
clear
|
||||||
echo -e "\n$ansi_art\n"
|
echo -e "\n$ansi_art\n"
|
||||||
|
|
||||||
# Use custom branch if instructed, otherwise default to master
|
# Pick the omarchy package channel. stable is the default; dev/rc are for
|
||||||
OMARCHY_REF="${OMARCHY_REF:-master}"
|
# pre-release testing.
|
||||||
|
case "${OMARCHY_REF:-master}" in
|
||||||
|
dev) channel=edge ;;
|
||||||
|
rc) channel=rc ;;
|
||||||
|
*) channel=stable ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Set mirror based on branch
|
echo "Configuring omarchy [${channel}] pacman repo..."
|
||||||
if [[ $OMARCHY_REF == "dev" ]]; then
|
sudo tee /etc/pacman.d/omarchy.conf >/dev/null <<EOF
|
||||||
export OMARCHY_MIRROR=edge
|
[omarchy]
|
||||||
echo 'Server = https://mirror.omarchy.org/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist >/dev/null
|
SigLevel = Optional TrustAll
|
||||||
elif [[ $OMARCHY_REF == "rc" ]]; then
|
Server = https://pkgs.omarchy.org/${channel}/\$arch
|
||||||
export OMARCHY_MIRROR=rc
|
EOF
|
||||||
echo 'Server = https://rc-mirror.omarchy.org/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist >/dev/null
|
if ! grep -q '^Include = /etc/pacman.d/omarchy.conf' /etc/pacman.conf; then
|
||||||
else
|
echo -e "\nInclude = /etc/pacman.d/omarchy.conf" | sudo tee -a /etc/pacman.conf >/dev/null
|
||||||
export OMARCHY_MIRROR=stable
|
|
||||||
echo 'Server = https://stable-mirror.omarchy.org/$repo/os/$arch' | sudo tee /etc/pacman.d/mirrorlist >/dev/null
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo pacman -Syu --noconfirm --needed git
|
echo "Refreshing pacman databases..."
|
||||||
|
sudo pacman -Sy --noconfirm
|
||||||
|
|
||||||
# Use custom repo if specified, otherwise default to basecamp/omarchy
|
echo "Installing omarchy-installer..."
|
||||||
OMARCHY_REPO="${OMARCHY_REPO:-basecamp/omarchy}"
|
sudo pacman -S --noconfirm --needed omarchy-installer
|
||||||
|
|
||||||
echo -e "\nCloning Omarchy from: https://github.com/${OMARCHY_REPO}.git"
|
|
||||||
rm -rf ~/.local/share/omarchy/
|
|
||||||
git clone "https://github.com/${OMARCHY_REPO}.git" ~/.local/share/omarchy >/dev/null
|
|
||||||
|
|
||||||
echo -e "\e[32mUsing branch: $OMARCHY_REF\e[0m"
|
|
||||||
cd ~/.local/share/omarchy
|
|
||||||
git fetch origin "${OMARCHY_REF}" && git checkout "${OMARCHY_REF}"
|
|
||||||
cd -
|
|
||||||
|
|
||||||
echo -e "\nInstallation starting..."
|
echo -e "\nInstallation starting..."
|
||||||
source ~/.local/share/omarchy/install.sh
|
exec omarchy-install
|
||||||
|
|||||||
Reference in New Issue
Block a user