Krolyxon
Commit 75735c9

Branches

Refs →

aurora75735c9

install.sh: install dependencies automaticallyr

Author
krolxon
Date
2026-01-12 14:35 +0530
Parent
bff4e78
Commit
75735c98739530ceaedc51819ec0690b7e35f38e

+7 −18

2 files changed

  1. M README.md +0 −5
  2. M install.sh +7 −13
M README.md View
@@ -3,11 +3,6 @@
33 <img src="https://github.com/krolyxon/dotfiles/blob/master/assets/fullscreen.png">
44 <img src="https://github.com/krolyxon/dotfiles/blob/master/assets/fullscreen2.png">
55
6−## Prerequisites
7−```bash
8−sudo pacman -S git gum stow
9−```
10−
116 ## Usage
127 ```bash
138 cd $HOME
M install.sh View
@@ -41,15 +41,6 @@ if [[ "$EUID" -eq 0 ]]; then
4141 exit 1
4242 fi
4343
44−
45−check_install() {
46− if ! command -v $1 >/dev/null 2>&1; then
47− echo "$1 is required. Install it first."
48− exit 1
49− fi
50−}
51−
52−
5344 choose_packages() {
5445 local -n arr=$1
5546 gum choose --no-limit \
@@ -87,14 +78,17 @@ confirm() {
8778 gum confirm --default=false "$msg"
8879 }
8980
81+install_prerequisites() {
82+ sudo pacman -S --needed --noconfirm stow gum git zsh
83+}
84+
85+
9086 #################
9187 ## GATEKEEPING ##
9288 #################
9389
94−## Add checks for prerequisites
95−check_install git
96−check_install gum
97−check_install stow
90+## Installs prerequisites
91+install_prerequisites
9892
9993 currentDir="$(dirname "$(readlink -f "$0")")"
10094 cd "$currentDir"