refactor: remove bootstrap spaghetti from installers

This commit is contained in:
2026-06-22 09:11:39 +05:30
parent 7e48f01cca
commit a56bee0b9c
17 changed files with 78 additions and 170 deletions

View File

@@ -6,20 +6,10 @@
# Bat Installer Script
#
# Run metascript to check if the shell is bash and load libraries
PARENT_DIR="$(dirname "$0")/.."
METASCRIPT_LOCAL="$PARENT_DIR/bootstrap.sh"
METASCRIPT_URL="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master/bootstrap.sh"
if [ -f "$METASCRIPT_LOCAL" ]; then
. "$METASCRIPT_LOCAL"
else
if command -v curl >/dev/null 2>&1; then
eval "$(curl -fsSL "$METASCRIPT_URL")"
else
echo "Error: curl is not installed to fetch bootstrap.sh." >&2
exit 1
fi
# Prevent standalone execution
if [ -z "${_LIB_COMMON_SOURCED:-}" ]; then
echo "Error: This script must be run through the 'b' CLI." >&2
exit 1
fi
set -euo pipefail