From 44fa6379882ed616c45671708115ed74316de06d Mon Sep 17 00:00:00 2001 From: James Aaron Erang Date: Fri, 26 Apr 2024 08:00:47 +0800 Subject: [PATCH] avoid cd in and out, loop through the file and install all the dependencies using pipx individually --- install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index c2d1a7c..e688252 100755 --- a/install.sh +++ b/install.sh @@ -109,12 +109,13 @@ function get_the_bot() { function install_python_dep() { # tell the user that the script is going to install the python dependencies echo "Installing python dependencies" - # cd into the directory - cd RedditVideoMakerBot-master # install the dependencies - pipx install -r requirements.txt - # cd out - cd .. + DEP_LIST=./RedditVideoMakerBot-master/requirements.txt + if [[ -f $DEP_LIST ]]; then + while read -r DEPS; do + pipx install $DEPS + done < "$DEP_LIST" + fi } # install playwright function