Krolyxon
Commit cdd7d03

Branches

Refs →

auroracdd7d03

install.sh: add check for stow prerequisite

Author
krolxon
Date
2026-01-08 12:50 +0530
Parent
38e5a0b
Commit
cdd7d036c781ad9adb59653c5814893a7c62179c

+12 −13

2 files changed

  1. M README.md +2 −2
  2. M install.sh +10 −11
M README.md View
@@ -3,9 +3,9 @@
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
6+## Prerequisites
77 ```bash
8−sudo pacman -S git gum
8+sudo pacman -S git gum stow
99 ```
1010
1111 ## Usage
M install.sh View
@@ -39,18 +39,17 @@ if [[ "$EUID" -eq 0 ]]; then
3939 fi
4040
4141
42−## Check if gum is installed
43−if ! command -v gum >/dev/null 2>&1; then
44− echo "gum is required. Install it first."
45− exit 1
46−fi
47−
48−## Check if git is installed
49−if ! command -v git >/dev/null 2>&1; then
50− echo "git is required. Install it first."
51− exit 1
52−fi
42+check_install() {
43+ if ! command -v $1 >/dev/null 2>&1; then
44+ echo "$1 is required. Install it first."
45+ exit 1
46+ fi
47+}
5348
49+## Add checks for prerequisites
50+check_install git
51+check_install gum
52+check_install stow
5453
5554 currentDir="$(dirname "$(readlink -f "$0")")"
5655 cd "$currentDir"