aboutsummaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh21
1 files changed, 10 insertions, 11 deletions
diff --git a/install.sh b/install.sh
index 1d7e612..dfa54e3 100755
--- a/install.sh
+++ b/install.sh
@@ -39,18 +39,17 @@ if [[ "$EUID" -eq 0 ]]; then
fi
-## Check if gum is installed
-if ! command -v gum >/dev/null 2>&1; then
- echo "gum is required. Install it first."
- exit 1
-fi
-
-## Check if git is installed
-if ! command -v git >/dev/null 2>&1; then
- echo "git is required. Install it first."
- exit 1
-fi
+check_install() {
+ if ! command -v $1 >/dev/null 2>&1; then
+ echo "$1 is required. Install it first."
+ exit 1
+ fi
+}
+## Add checks for prerequisites
+check_install git
+check_install gum
+check_install stow
currentDir="$(dirname "$(readlink -f "$0")")"
cd "$currentDir"