From f34bd3309d77eca5a79adc931c1d34a72b4a6f4d Mon Sep 17 00:00:00 2001 From: Tim Jenssen Date: Mon, 13 Mar 2023 17:26:56 +0100 Subject: [PATCH] scripts: add --keep-signed-content-at to makedmg.py Change-Id: I3fd76cced3233afca90158717fbff400126a09c6 Reviewed-by: Tim Jenssen --- scripts/makedmg.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/makedmg.py b/scripts/makedmg.py index 9159889bdef..39cd6d1acf4 100755 --- a/scripts/makedmg.py +++ b/scripts/makedmg.py @@ -21,6 +21,8 @@ def parse_arguments(): parser.add_argument('--dmg-size', default='1500m', required=False) parser.add_argument('--license-replacement', default=None, help='Absolute path to a license file which replaces the default LICENSE.GPL3-EXCEPT from Qt Creator source directory.') + parser.add_argument('--keep-signed-content-at', default=None, + help='For online installer we want to keep the signed .app without the dmg. This is used to create a 7z.') return parser.parse_args() def main(): @@ -43,6 +45,9 @@ def main(): # sleep a few seconds to make sure disk image is fully unmounted etc time.sleep(5) finally: - shutil.rmtree(tempdir_base) + if arguments.keep_signed_content_at: + shutil.move(tempdir, arguments.keep_signed_content_at) + else: + shutil.rmtree(tempdir_base) if __name__ == "__main__": main()