From 9a0d87a35df36cfbe81b5a953678c0dc97c18787 Mon Sep 17 00:00:00 2001
From: Blaise Li <blaise.li__git@nsup.org>
Date: Mon, 18 Nov 2019 12:51:45 +0100
Subject: [PATCH] Add install rule in Makefile.

---
 singularity/Makefile              | 16 ++++++++++++++++
 singularity/README_singularity.md |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/singularity/Makefile b/singularity/Makefile
index 947b75f..58d42b0 100644
--- a/singularity/Makefile
+++ b/singularity/Makefile
@@ -1,3 +1,19 @@
+VERSION := $(shell git log | head -1 | cut -d " " -f2)
+
+ifeq ($(PREFIX),)
+	PREFIX := /opt/bioinfo_utils_$(VERSION)
+endif
+
+
+install: all
+	install -d $(PREFIX)/bin
+	install run_pipeline $(PREFIX)/bin/.
+	install run_pipeline.sh $(PREFIX)/bin/.
+	for datatype in sRNA-seq smallRNA-seq RNA-seq GRO-seq PRO-seq Degradome-seq Ribo-seq iCLIP-seq iCLIP; \
+	do \
+	    ln -s $(PREFIX)/bin/run_pipeline.sh $(PREFIX)/bin/run_$${datatype}_pipeline; \
+	done
+
 all: run_pipeline
 
 # Should depend on the rest of the repository.
diff --git a/singularity/README_singularity.md b/singularity/README_singularity.md
index 9538e32..8bd8266 100644
--- a/singularity/README_singularity.md
+++ b/singularity/README_singularity.md
@@ -28,7 +28,7 @@ Here are the aliases available for each pipeline:
     - `run_PRO-seq_pipeline`
 * RNA-seq
     - `run_RNA-seq_pipeline`
-* Degradme-seq
+* Degradome-seq
     - `run_Degradome-seq_pipeline`
 * Ribo-seq
     - `run_Ribo-seq_pipeline`
-- 
GitLab