From 4402e6b2e336045aafe41e96ccfad2218e237cbf Mon Sep 17 00:00:00 2001 From: "uni@bor.mac" Date: Mon, 9 Jun 2025 22:56:51 +0200 Subject: [PATCH] install.sh: check if dependencies are installed --- install.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 8587471..6e53b7c 100755 --- a/install.sh +++ b/install.sh @@ -5,6 +5,13 @@ # - python3: check with `python3 --version` #- venv: check with `python3 -m venv --help` # +# check dependencies +set -e +bash --version > /dev/null +python3 --version > /dev/null +python3 -m venv --help > /dev/null +set +e +# PREFIX="$HOME/.local" HELP=""" $0: install pdf2book with its virtual environment @@ -73,7 +80,7 @@ then then echo -n """Directory '$SRCDIR' already exist. Do you want to overwrite? [y/N] """ - read confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1 + read confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || echo "... exiting ..." && exit 1 fi rm -rf $SRCDIR fi