From 1882bcc7e13695509af33a2a0d20fd4cce25d55d Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 4 Apr 2019 11:40:02 +1100 Subject: [PATCH] init: join the generated commands with '&&' This allows us to directly use the output of the script in other scripts. --- init.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/init.py b/init.py index e724623..e5aa525 100755 --- a/init.py +++ b/init.py @@ -71,6 +71,9 @@ if __name__ == '__main__': accumulated += [f'"-D{key}={val}"' for key, val in vars.items()] accumulated += args + cmds = [ + f"cp {os.path.join(self_dir, 'CACHEDIR.tag.in')} CACHEDIR.tag", + f"cmake {source_dir} {' '.join(accumulated)}", + ] - print(f"cmake {source_dir} {' '.join(accumulated)}") - print(f"cp {os.path.join(self_dir, 'CACHEDIR.tag.in')} CACHEDIR.tag") + print(" && ".join(cmds))