fix(install): remove install mode selection, keep simple
Removed Full/Minimal/Custom mode picker. Script now always installs all packages. Kept -n dry-run and -y auto-yes flags.
This commit is contained in:
1 file changed
+13
-97
+13
-97
@@ -20,19 +20,16 @@ set -o pipefail
|
|||||||
# ── CLI flags ──────────────────────────────────────────────────────
|
# ── CLI flags ──────────────────────────────────────────────────────
|
||||||
AUTO_YES=false
|
AUTO_YES=false
|
||||||
DRY_RUN=false
|
DRY_RUN=false
|
||||||
MINIMAL=false
|
|
||||||
for arg in "$@"; do
|
for arg in "$@"; do
|
||||||
case "$arg" in
|
case "$arg" in
|
||||||
-y|--yes) AUTO_YES=true ;;
|
-y|--yes) AUTO_YES=true ;;
|
||||||
-n|--dry-run) DRY_RUN=true ;;
|
-n|--dry-run) DRY_RUN=true ;;
|
||||||
-m|--minimal) MINIMAL=true ;;
|
|
||||||
-h|--help)
|
-h|--help)
|
||||||
echo "Usage: install.sh [OPTIONS]"
|
echo "Usage: install.sh [OPTIONS]"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -y, --yes Skip all prompts"
|
echo " -y, --yes Skip all prompts"
|
||||||
echo " -n, --dry-run Show what would be installed without installing"
|
echo " -n, --dry-run Show what would be installed without installing"
|
||||||
echo " -m, --minimal Install only core packages"
|
|
||||||
echo " -h, --help Show this help"
|
echo " -h, --help Show this help"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
@@ -43,13 +40,10 @@ REPO_URL="https://github.com/S4NKALP/Modus.git"
|
|||||||
INSTALL_DIR="$HOME/.config/Modus"
|
INSTALL_DIR="$HOME/.config/Modus"
|
||||||
|
|
||||||
# ── Package definitions ────────────────────────────────────────────
|
# ── Package definitions ────────────────────────────────────────────
|
||||||
CORE_PACKAGES=(
|
PACKAGES=(
|
||||||
uv
|
uv
|
||||||
fabric-cli-git
|
fabric-cli-git
|
||||||
uwsm
|
uwsm
|
||||||
)
|
|
||||||
|
|
||||||
SHELL_PACKAGES=(
|
|
||||||
cliphist
|
cliphist
|
||||||
slurp
|
slurp
|
||||||
grim
|
grim
|
||||||
@@ -59,44 +53,26 @@ SHELL_PACKAGES=(
|
|||||||
libnotify
|
libnotify
|
||||||
playerctl
|
playerctl
|
||||||
matugen-bin
|
matugen-bin
|
||||||
)
|
|
||||||
|
|
||||||
HYPRLAND_PACKAGES=(
|
|
||||||
hypridle
|
hypridle
|
||||||
hyprsunset
|
hyprsunset
|
||||||
hyprpicker
|
hyprpicker
|
||||||
hyprshot
|
hyprshot
|
||||||
gtk-session-lock
|
gtk-session-lock
|
||||||
)
|
|
||||||
|
|
||||||
UI_PACKAGES=(
|
|
||||||
awww
|
awww
|
||||||
apple-fonts
|
apple-fonts
|
||||||
webp-pixbuf-loader
|
webp-pixbuf-loader
|
||||||
cinnamon-desktop
|
cinnamon-desktop
|
||||||
libmediaart
|
libmediaart
|
||||||
)
|
|
||||||
|
|
||||||
HARDWARE_PACKAGES=(
|
|
||||||
acpi
|
acpi
|
||||||
brightnessctl
|
brightnessctl
|
||||||
power-profiles-daemon
|
power-profiles-daemon
|
||||||
ddcutil
|
ddcutil
|
||||||
at-spi2-core
|
at-spi2-core
|
||||||
)
|
|
||||||
|
|
||||||
NETWORK_PACKAGES=(
|
|
||||||
networkmanager
|
networkmanager
|
||||||
network-manager-applet
|
network-manager-applet
|
||||||
blueman
|
blueman
|
||||||
)
|
|
||||||
|
|
||||||
AUDIO_PACKAGES=(
|
|
||||||
pipewire
|
pipewire
|
||||||
libpulse
|
libpulse
|
||||||
)
|
|
||||||
|
|
||||||
BUILD_PACKAGES=(
|
|
||||||
gcc
|
gcc
|
||||||
make
|
make
|
||||||
pkgconf
|
pkgconf
|
||||||
@@ -115,17 +91,6 @@ BUILD_PACKAGES=(
|
|||||||
ffmpeg
|
ffmpeg
|
||||||
)
|
)
|
||||||
|
|
||||||
ALL_PACKAGES=(
|
|
||||||
"${CORE_PACKAGES[@]}"
|
|
||||||
"${SHELL_PACKAGES[@]}"
|
|
||||||
"${HYPRLAND_PACKAGES[@]}"
|
|
||||||
"${UI_PACKAGES[@]}"
|
|
||||||
"${HARDWARE_PACKAGES[@]}"
|
|
||||||
"${NETWORK_PACKAGES[@]}"
|
|
||||||
"${AUDIO_PACKAGES[@]}"
|
|
||||||
"${BUILD_PACKAGES[@]}"
|
|
||||||
)
|
|
||||||
|
|
||||||
# ── Colors ─────────────────────────────────────────────────────────
|
# ── Colors ─────────────────────────────────────────────────────────
|
||||||
if [ -t 1 ]; then
|
if [ -t 1 ]; then
|
||||||
GREEN=$(tput setaf 2)
|
GREEN=$(tput setaf 2)
|
||||||
@@ -265,50 +230,23 @@ if ! command -v git &>/dev/null; then
|
|||||||
fi
|
fi
|
||||||
success "git found"
|
success "git found"
|
||||||
|
|
||||||
# ── Install mode selection ────────────────────────────────────────
|
# ── Package list ──────────────────────────────────────────────────
|
||||||
section "Install mode"
|
section "Packages"
|
||||||
|
|
||||||
if [ "$MINIMAL" = true ]; then
|
if [ "$DRY_RUN" = true ]; then
|
||||||
PACKAGES=("${CORE_PACKAGES[@]}")
|
|
||||||
info "Minimal mode: ${#PACKAGES[@]} core packages only"
|
|
||||||
elif [ "$AUTO_YES" = true ]; then
|
|
||||||
PACKAGES=("${ALL_PACKAGES[@]}")
|
|
||||||
info "Full install: ${#PACKAGES[@]} packages"
|
|
||||||
else
|
|
||||||
echo -e " ${BOLD}Choose install mode:${RESET}"
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e " ${GREEN}${ARROW}${RESET} ${BOLD}1) Full${RESET} ${DIM}— everything (${#ALL_PACKAGES[@]} packages)${RESET}"
|
printf " ${DIM}%s${RESET}\n" "${PACKAGES[@]}"
|
||||||
echo -e " ${YELLOW}${ARROW}${RESET} ${BOLD}2) Minimal${RESET} ${DIM}— core only (${#CORE_PACKAGES[@]} packages)${RESET}"
|
|
||||||
echo -e " ${CYAN}${ARROW}${RESET} ${BOLD}3) Custom${RESET} ${DIM}— pick categories${RESET}"
|
|
||||||
echo ""
|
echo ""
|
||||||
read -rp " ${BOLD}Select [1-3]:${RESET} " mode_choice
|
info "Dry run — no packages will be installed"
|
||||||
|
exit 0
|
||||||
case "$mode_choice" in
|
|
||||||
2)
|
|
||||||
PACKAGES=("${CORE_PACKAGES[@]}")
|
|
||||||
;;
|
|
||||||
3)
|
|
||||||
PACKAGES=("${CORE_PACKAGES[@]}")
|
|
||||||
echo ""
|
|
||||||
for cat in "SHELL:Shell tools" "HYPRLAND:Hyprland extras" "UI:Desktop widgets" "HARDWARE:Hardware control" "NETWORK:Bluetooth & network" "AUDIO:Audio" "BUILD:Build tools"; do
|
|
||||||
local_name="${cat%%:*}"
|
|
||||||
local_label="${cat#*:}"
|
|
||||||
local_ref="${local_name}_PACKAGES[@]"
|
|
||||||
local_count="${#${!local_ref}}"
|
|
||||||
if confirm "${local_label} (${local_count} packages)?" "y"; then
|
|
||||||
PACKAGES+=("${!local_ref}")
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
PACKAGES=("${ALL_PACKAGES[@]}")
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
divider
|
info "Total: ${#PACKAGES[@]} packages"
|
||||||
echo -e " ${BOLD}Will install ${GREEN}${#PACKAGES[@]}${RESET}${BOLD} packages${RESET}"
|
|
||||||
divider
|
if ! confirm "Proceed with installation?"; then
|
||||||
|
warn "Cancelled"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# ── Sudo ───────────────────────────────────────────────────────────
|
# ── Sudo ───────────────────────────────────────────────────────────
|
||||||
section "Permissions"
|
section "Permissions"
|
||||||
@@ -327,28 +265,6 @@ while true; do
|
|||||||
done 2>/dev/null &
|
done 2>/dev/null &
|
||||||
SUDO_KEEPER_PID=$!
|
SUDO_KEEPER_PID=$!
|
||||||
|
|
||||||
# ── Show package list ─────────────────────────────────────────────
|
|
||||||
section "Packages"
|
|
||||||
|
|
||||||
if [ "$DRY_RUN" = true ]; then
|
|
||||||
echo ""
|
|
||||||
printf " ${DIM}%s${RESET}\n" "${PACKAGES[@]}"
|
|
||||||
echo ""
|
|
||||||
info "Dry run — no packages will be installed"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if confirm "View full package list?"; then
|
|
||||||
echo ""
|
|
||||||
printf " ${DIM}${BULLET} %s${RESET}\n" "${PACKAGES[@]}"
|
|
||||||
echo ""
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! confirm "Proceed with installation?"; then
|
|
||||||
warn "Cancelled"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ── AUR helper ─────────────────────────────────────────────────────
|
# ── AUR helper ─────────────────────────────────────────────────────
|
||||||
section "AUR helper"
|
section "AUR helper"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user