diff options
| -rw-r--r-- | README.md | 4 | ||||
| -rwxr-xr-x | install.sh | 21 |
2 files changed, 12 insertions, 13 deletions
@@ -3,9 +3,9 @@ <img src="https://github.com/krolyxon/dotfiles/blob/master/assets/fullscreen.png"> <img src="https://github.com/krolyxon/dotfiles/blob/master/assets/fullscreen2.png"> -## prerequisites +## Prerequisites ```bash -sudo pacman -S git gum +sudo pacman -S git gum stow ``` ## Usage @@ -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" |
