Commit bb380584 authored by Nathalie Rousse's avatar Nathalie Rousse
Browse files

Minor modification of Makefile : adding creation of folders if not exist.

parent 6cd4e499
......@@ -30,9 +30,11 @@ VLE_DEF=$(VLE_DEF_HOME)/VLE.def
ERECORD_DEF=$(ERECORD_DEF_HOME)/erecord.def
REP_DEF=$(REP_DEF_HOME)/rep.def
VLE_IMG=/opt/erecord/factory/install/containers/$(VLEVERSION)/VLE.simg
ERECORD_IMG=/opt/erecord/factory/install/containers/$(VLEVERSION)/erecord.simg
REP_IMG=/opt/erecord/repositories/$(VLEVERSION)/$(REPNAME)/rep.simg
FACTORY_CONTAINERS_DIR=/opt/erecord/factory/install/containers
REPOSITORIES_DIR=/opt/erecord/repositories
VLE_IMG=$(FACTORY_CONTAINERS_DIR)/$(VLEVERSION)/VLE.simg
ERECORD_IMG=$(FACTORY_CONTAINERS_DIR)/$(VLEVERSION)/erecord.simg
REP_IMG=$(REPOSITORIES_DIR)/$(VLEVERSION)/$(REPNAME)/rep.simg
all:
cat install_containers.txt
......@@ -143,6 +145,8 @@ VLE.simg: $(VLE_IMG)
$(VLE_IMG): $(VLE_DEF)
@echo "$(VLE_IMG) <-- $(VLE_DEF)"
if ! [ -d $(FACTORY_CONTAINERS_DIR) ]; then mkdir $(FACTORY_CONTAINERS_DIR); fi;
if ! [ -d $(FACTORY_CONTAINERS_DIR)/$(VLEVERSION) ]; then mkdir $(FACTORY_CONTAINERS_DIR)/$(VLEVERSION); fi;
if [ -f $(VLE_IMG) ]; then mv $(VLE_IMG) $(VLE_IMG).old; fi;
sudo singularity build $(VLE_IMG) $(VLE_DEF)
......@@ -175,6 +179,8 @@ rep.simg: $(REP_IMG)
$(REP_IMG): $(REP_DEF) $(ERECORD_IMG)
@echo "$(REP_IMG) <-- $(REP_DEF) $(ERECORD_IMG)"
if ! [ -d $(REPOSITORIES_DIR)/$(VLEVERSION) ]; then mkdir $(REPOSITORIES_DIR)/$(VLEVERSION); fi;
if ! [ -d $(REPOSITORIES_DIR)/$(VLEVERSION)/$(REPNAME) ]; then mkdir $(REPOSITORIES_DIR)/$(VLEVERSION)/$(REPNAME); fi;
sudo singularity build $(REP_IMG) $(ERECORD_IMG)
sudo singularity build $(REP_IMG) $(REP_DEF)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment