From bb12482c40f0e0a91b73143d5f299066b072f526 Mon Sep 17 00:00:00 2001 From: Rahul Date: Sat, 1 Jul 2023 17:26:23 +0530 Subject: [PATCH] octave implementation for windows --- fri/server/main.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/fri/server/main.py b/fri/server/main.py index 363bc35..7358a43 100644 --- a/fri/server/main.py +++ b/fri/server/main.py @@ -99,7 +99,14 @@ def build(dir): if(platform.uname()[0]!='Windows'): proc= call(["rm", "concore.octave"], cwd=concore_path) else: - proc= call(["del", "concore.octave"], cwd=concore_path) + proc= call(["del", "concore.octave"], shell=True, cwd=concore_path) + + if(octave == 'true' and dotMCheck): + if(platform.uname()[0]!='Windows'): + proc= call(["touch", "concore.octave"], cwd=concore_path) + else: + proc= open(os.path.abspath(os.path.join(concore_path, 'concore.octave')), 'x') + if not os.path.exists(dir_path): if(platform.uname()[0]=='Windows'): @@ -116,15 +123,11 @@ def build(dir): else: if(out_dir == None or out_dir == ""): if(docker == 'true'): - if(octave == 'true' and dotMCheck): - proc= call(["touch", "concore.octave"], cwd=concore_path) proc= call(["./makedocker", makestudy_dir], cwd=concore_path) else: proc= call(["./makestudy", makestudy_dir], cwd=concore_path) else: if(docker == 'true'): - if(octave == 'true' and dotMCheck): - proc= call(["touch", "concore.octave"], cwd=concore_path) proc= call(["./makedocker", makestudy_dir, out_dir], cwd=concore_path) else: proc= call(["./makestudy", makestudy_dir, out_dir], cwd=concore_path)