Properly handling ubuntu directory as a non top of repository 91/9091/2
authorMichal Skalski <mskalski@mirantis.com>
Wed, 3 Feb 2016 01:29:09 +0000 (02:29 +0100)
committerMichal Skalski <mskalski@mirantis.com>
Wed, 3 Feb 2016 08:19:01 +0000 (09:19 +0100)
Change-Id: Ie7d921b3728df937dc719cd638fa7ae035fc9307
Signed-off-by: Michal Skalski <mskalski@mirantis.com>
build/f_isoroot/f_repobuild/Makefile

index 966da36..105efa3 100644 (file)
@@ -11,6 +11,7 @@
 SHELL := /bin/bash
 TOP := $(shell pwd)
 UBUNTU_DIR := $(shell dirname $(MIRROR_UBUNTU_ROOT))
+TMP_ROOT_DIR := $(shell echo "$(UBUNTU_DIR)" | cut -d "/" -f2)
 
 include ../../config.mk
 
@@ -35,8 +36,8 @@ nailgun:
        mv nailgun/mirrors$(MIRROR_MOS_UBUNTU_ROOT) nailgun/mirrors/mos-repos/ubuntu/$(MOS_VERSION)
        rmdir nailgun/mirrors/mos-repos/ubuntu/snapshots
        if [ "$(UBUNTU_DIR)" != "/" ]; then \
-         mv nailgun/mirrors$(UBUNTU_DIR)/ubuntu naligun/mirros/ubuntu;\
-         rm -rf nailgun/mirrors$(UBUNTU_DIR);\
+         mv nailgun/mirrors$(UBUNTU_DIR)/ubuntu nailgun/mirrors/ubuntu;\
+         rm -rf nailgun/mirrors/$(TMP_ROOT_DIR);\
        fi
        # Store artifact in cache straight away if caching is enabled
        # (no .cacheid will be present unless this is a cached build)