From 4ffeb9eae280d2972aae474c5bde2894b6d7cb4f Mon Sep 17 00:00:00 2001 From: Krateng Date: Wed, 16 Oct 2019 15:15:16 +0200 Subject: [PATCH] Added script tp update requirements --- .gitignore | 1 + maloja | 6 +++++- update_requirements.sh | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 update_requirements.sh diff --git a/.gitignore b/.gitignore index ac6d7b6..ff3a5ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ # generic temporary / dev files *.pyc *.sh +!/update_requirements.sh *.note *.xcf nohup.out diff --git a/maloja b/maloja index b0f8e36..83899b3 100755 --- a/maloja +++ b/maloja @@ -297,7 +297,11 @@ def update(): os.chmod("./maloja",os.stat("./maloja").st_mode | stat.S_IXUSR) - print("Make sure to update required modules! (" + yellow("pip3 install -r requirements.txt --upgrade --no-cache-dir") + ")") + try: + returnval = os.system("bash update_requirements.sh") + assert returnval == 0 + except: + print("Make sure to update required modules! (" + yellow("bash update_requirements.sh") + ")") if stop(): start() #stop returns whether it was running before, in which case we restart it diff --git a/update_requirements.sh b/update_requirements.sh new file mode 100644 index 0000000..6e346b8 --- /dev/null +++ b/update_requirements.sh @@ -0,0 +1 @@ +pip3 install -r requirements.txt --upgrade --no-cache-dir