Streamline the installer for fresh Arch installs

This commit is contained in:
SirBlob committed 2026-09-24 12:00:22 -04:00
1 parent 501d066e64
commit d59725f193
14 files changed
+234 -44

No files matched your search

Executable
+32
View File
@@ -0,0 +1,32 @@
#!/bin/bash
set -e
repo_url="${BLOB_REPO_URL:-https://git.sirblob.co/SirBlob/blomarchy.git}"
repo_branch="${BLOB_REPO_BRANCH:-main}"
checkout_dir="${BLOB_CHECKOUT_DIR:-$HOME/dotfiles}"
if (( EUID == 0 )); then
echo "Run this as your own user, not as root. It asks for sudo when it needs it." >&2
exit 1
fi
if ! command -v pacman &>/dev/null; then
echo "pacman not found; Blob installs on Arch Linux only." >&2
exit 1
fi
if ! command -v git &>/dev/null; then
echo "Installing git"
sudo pacman -Syu --needed --noconfirm git
fi
if [[ -d $checkout_dir/.git ]]; then
echo "Updating $checkout_dir"
git -C "$checkout_dir" pull --ff-only
else
echo "Cloning $repo_url into $checkout_dir"
git clone --branch "$repo_branch" "$repo_url" "$checkout_dir"
fi
exec "$checkout_dir/install.sh" "$@" </dev/tty