add x64 bins and arm64 bin

This commit is contained in:
Your Name
2026-08-03 02:08:58 -04:00
parent a53ba0a68e
commit cf7ba2d58a
25 changed files with 3565 additions and 48 deletions
+47 -19
View File
@@ -6,26 +6,32 @@ usage() {
cat <<EOF
Usage: bash apps/install.sh [OPTIONS] [app ...]
Install optional desktop applications.
Install or uninstall optional desktop applications.
Options:
--all Install all available apps without prompting
-h, --help Show this help message
--all Apply action to all available apps without prompting
--uninstall Uninstall the selected apps instead of installing
-h, --help Show this help message
Examples:
bash apps/install.sh # interactive selection
bash apps/install.sh --all # install everything
bash apps/install.sh brave vscode # install specific apps
bash apps/install.sh # interactive install selection
bash apps/install.sh --all # install everything
bash apps/install.sh brave vscode # install specific apps
bash apps/install.sh --uninstall # interactive uninstall selection
bash apps/install.sh --uninstall --all # uninstall everything
bash apps/install.sh --uninstall brave # uninstall specific apps
EOF
exit 0
}
ALL=0
UNINSTALL=0
POSITIONAL=()
while [[ $# -gt 0 ]]; do
case "$1" in
--all) ALL=1; shift ;;
--uninstall) UNINSTALL=1; shift ;;
-h|--help) usage ;;
-*) err "Unknown option: $1" ;;
*) POSITIONAL+=("$1"); shift ;;
@@ -62,11 +68,11 @@ for cat_dir in "$APPS_DIR"/*/; do
[ "$has_apps" -eq 0 ] && continue
CATEGORIES+=("$cat_name")
CAT_APPS["$cat_name"]=()
CAT_APPS["$cat_name"]=""
for f in "$cat_dir"*.sh; do
[ -f "$f" ] || continue
app_name=$(basename "$f" .sh)
CAT_APPS["$cat_name"]+=("$app_name")
CAT_APPS["$cat_name"]+=" $app_name"
done
done
@@ -74,7 +80,7 @@ done
find_app_category() {
local app="$1"
for cat in "${CATEGORIES[@]}"; do
for a in "${CAT_APPS[$cat]}"; do
for a in ${CAT_APPS[$cat]}; do
[ "$a" == "$app" ] && { echo "$cat"; return 0; }
done
done
@@ -96,7 +102,7 @@ if [ "${#POSITIONAL[@]}" -gt 0 ]; then
# ── Mode 2: --all ─────────────────────────────────────────────
elif [ "$ALL" -eq 1 ]; then
for cat in "${CATEGORIES[@]}"; do
for app in "${CAT_APPS[$cat]}"; do
for app in ${CAT_APPS[$cat]}; do
SELECTED+=("$app")
done
done
@@ -104,14 +110,22 @@ elif [ "$ALL" -eq 1 ]; then
# ── Mode 3: interactive TUI ───────────────────────────────────
else
section "Optional Applications"
echo "Select apps to install (y/n for each):"
if [ "$UNINSTALL" -eq 1 ]; then
echo "Select apps to uninstall (y/n for each):"
else
echo "Select apps to install (y/n for each):"
fi
echo
for cat in "${CATEGORIES[@]}"; do
display="${CAT_NAMES[$cat]:-$cat}"
echo " $display"
for app in "${CAT_APPS[$cat]}"; do
read -rp " Install ${app}? [y/N]: " yn
for app in ${CAT_APPS[$cat]}; do
if [ "$UNINSTALL" -eq 1 ]; then
read -rp " Remove ${app}? [y/N]: " yn
else
read -rp " Install ${app}? [y/N]: " yn
fi
if [[ "$yn" =~ ^[Yy] ]]; then
SELECTED+=("$app")
fi
@@ -120,11 +134,15 @@ else
done
fi
# ── Install selected apps ──────────────────────────────────────
# ── Apply action to selected apps ─────────────────────────────
[ "${#SELECTED[@]}" -eq 0 ] && { warn "No apps selected"; exit 0; }
echo
section "Installing ${SELECTED[*]}"
if [ "$UNINSTALL" -eq 1 ]; then
section "Uninstalling ${SELECTED[*]}"
else
section "Installing ${SELECTED[*]}"
fi
timer_start
count=1
@@ -132,12 +150,22 @@ total=${#SELECTED[@]}
for app in "${SELECTED[@]}"; do
cat=$(find_app_category "$app")
step "$count" "$total" "$app"
bash "$APPS_DIR/$cat/$app.sh"
if [ "$UNINSTALL" -eq 1 ]; then
bash "$APPS_DIR/$cat/$app.sh" uninstall
else
bash "$APPS_DIR/$cat/$app.sh"
fi
count=$((count + 1))
echo
done
echo
echo "${GREEN}════════════════════════════════════════════${RESET}"
echo "${GREEN} Apps installed ($(timer_stop))${RESET}"
echo "${GREEN}════════════════════════════════════════════${RESET}"
if [ "$UNINSTALL" -eq 1 ]; then
echo "${GREEN}════════════════════════════════════════════${RESET}"
echo "${GREEN} Apps uninstalled ($(timer_stop))${RESET}"
echo "${GREEN}════════════════════════════════════════════${RESET}"
else
echo "${GREEN}════════════════════════════════════════════${RESET}"
echo "${GREEN} Apps installed ($(timer_stop))${RESET}"
echo "${GREEN}════════════════════════════════════════════${RESET}"
fi