summaryrefslogtreecommitdiffstats
path: root/scripts/oe-publish-sdk
diff options
context:
space:
mode:
authorCostin Constantin <costin.c.constantin@intel.com>2015-10-22 17:16:12 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-24 12:17:19 +0100
commit47860e483d7a9b4440d1ed9bd96d724370887f58 (patch)
treec4c0423910f6f434ca315265070c817794d6b53c /scripts/oe-publish-sdk
parentf9cf31525fc885e1a0f65bd55654631257f87078 (diff)
downloadopenembedded-core-contrib-47860e483d7a9b4440d1ed9bd96d724370887f58.tar.gz
openembedded-core-contrib-47860e483d7a9b4440d1ed9bd96d724370887f58.tar.bz2
openembedded-core-contrib-47860e483d7a9b4440d1ed9bd96d724370887f58.zip
scripts/oe-publish-sdk: create directory before making git repo
This patch fixes a small bug that prevents seting a git repo in exported SDK layers dir. Before setting a git repo, that directory needs to be created. [ YOCTO #6659 ] Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'scripts/oe-publish-sdk')
-rwxr-xr-xscripts/oe-publish-sdk4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/oe-publish-sdk b/scripts/oe-publish-sdk
index 1737c9f3bc..c4c35bda11 100755
--- a/scripts/oe-publish-sdk
+++ b/scripts/oe-publish-sdk
@@ -101,9 +101,9 @@ def publish(args):
# Setting up the git repo
if not is_remote:
- cmd = 'set -e; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; fi; git add -A .; git commit -q -m "init repo" || true;' % destination
+ cmd = 'set -e; mkdir -p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; fi; git add -A .; git commit -q -m "init repo" || true;' % (destination, destination)
else:
- cmd = "ssh %s 'set -e; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; fi; git add -A .; git commit -q -m \"init repo\" || true;'" % (host, destdir)
+ cmd = "ssh %s 'set -e; mkdir-p %s/layers; cd %s/layers; if [ ! -e .git ]; then git init .; mv .git/hooks/post-update.sample .git/hooks/post-update; fi; git add -A .; git commit -q -m \"init repo\" || true;'" % (host, destdir, destdir)
ret = subprocess.call(cmd, shell=True)
if ret == 0:
logger.info('SDK published successfully')