diff options
author | Adrian Freihofer <adrian.freihofer@gmail.com> | 2020-09-07 18:43:14 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-08 16:43:40 +0100 |
commit | 8d7b5e56ad3149b58e647c7247a11d230b6c8ae2 (patch) | |
tree | bcaac2d74009f941a549333fe6f033d4ee6da7b6 /scripts/oe-publish-sdk | |
parent | da44b89f6611c80ceee40f75a9314d1749107581 (diff) | |
download | poky-8d7b5e56ad3149b58e647c7247a11d230b6c8ae2.tar.gz |
oe-publish-sdk: add --keep-orig option
Support publishing the sdk-update as well as the sdk installer in one
go.
(From OE-Core rev: 97f1544132ba3bb0c85cdafff6a870c7ba0ef2e4)
Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/oe-publish-sdk')
-rwxr-xr-x | scripts/oe-publish-sdk | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk index 19a5d69864..deb8ae1807 100755 --- a/scripts/oe-publish-sdk +++ b/scripts/oe-publish-sdk | |||
@@ -94,7 +94,10 @@ def publish(args): | |||
94 | logger.error('Failed to unpack %s to %s' % (dest_sdk, destination)) | 94 | logger.error('Failed to unpack %s to %s' % (dest_sdk, destination)) |
95 | return ret | 95 | return ret |
96 | else: | 96 | else: |
97 | cmd = "ssh %s 'sh %s -p -y -d %s && rm -f %s'" % (host, dest_sdk, destdir, dest_sdk) | 97 | rm_or_not = " && rm -f %s" % dest_sdk |
98 | if args.keep_orig: | ||
99 | rm_or_not = "" | ||
100 | cmd = "ssh %s 'sh %s -p -y -d %s%s'" % (host, dest_sdk, destdir, rm_or_not) | ||
98 | ret = subprocess.call(cmd, shell=True) | 101 | ret = subprocess.call(cmd, shell=True) |
99 | if ret == 0: | 102 | if ret == 0: |
100 | logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir)) | 103 | logger.info('Successfully unpacked %s to %s' % (dest_sdk, destdir)) |
@@ -119,6 +122,7 @@ def main(): | |||
119 | parser = argparse_oe.ArgumentParser(description="OpenEmbedded extensible SDK publishing tool - writes server-side data to support the extensible SDK update process to a specified location") | 122 | parser = argparse_oe.ArgumentParser(description="OpenEmbedded extensible SDK publishing tool - writes server-side data to support the extensible SDK update process to a specified location") |
120 | parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') | 123 | parser.add_argument('-d', '--debug', help='Enable debug output', action='store_true') |
121 | parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') | 124 | parser.add_argument('-q', '--quiet', help='Print only errors', action='store_true') |
125 | parser.add_argument('-k', '--keep-orig', help='When published to a remote host, the eSDK installer gets deleted by default.', action='store_true') | ||
122 | 126 | ||
123 | parser.add_argument('sdk', help='Extensible SDK to publish (path to .sh installer file)') | 127 | parser.add_argument('sdk', help='Extensible SDK to publish (path to .sh installer file)') |
124 | parser.add_argument('dest', help='Destination to publish SDK to; can be local path or remote in the form of user@host:/path (in the latter case ssh/scp will be used).') | 128 | parser.add_argument('dest', help='Destination to publish SDK to; can be local path or remote in the form of user@host:/path (in the latter case ssh/scp will be used).') |