From 07e3a16808466c42ce399385a221909aa05908f4 Mon Sep 17 00:00:00 2001
From: criscuol <alexis.criscuolo@pasteur.fr>
Date: Wed, 24 Mar 2021 15:30:29 +0100
Subject: [PATCH] 2.0

---
 contig_info.sh | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/contig_info.sh b/contig_info.sh
index cd020ae..a853673 100755
--- a/contig_info.sh
+++ b/contig_info.sh
@@ -20,8 +20,7 @@
 #  Contact:                                                                                                  #
 #   Alexis Criscuolo                                                            alexis.criscuolo@pasteur.fr  #
 #   Genome Informatics & Phylogenetics (GIPhy)                                             giphy.pasteur.fr  #
-#   Bioinformatics and Biostatistics Hub                              research.pasteur.fr/en/team/hub-giphy  #
-#   USR 3756 IP CNRS                          research.pasteur.fr/team/bioinformatics-and-biostatistics-hub  #
+#   Bioinformatics and Biostatistics Hub      research.pasteur.fr/team/bioinformatics-and-biostatistics-hub  #
 #   Dpt. Biologie Computationnelle                     research.pasteur.fr/department/computational-biology  #
 #   Institut Pasteur, Paris, FRANCE                                                     research.pasteur.fr  #
 #                                                                                                            #
@@ -94,6 +93,18 @@ fi
 #                                                                                                           #
 #############################################################################################################
 
+#############################################################################################################
+#                                                                                                           #
+#  ================                                                                                         #
+#  = CONSTANTS    =                                                                                         #
+#  ================                                                                                         #
+#                                                                                                           #
+# = temp directory =======================================================================================  #
+#                                                                                                           #
+  TEMP_DIR=${TMPDIR:-/tmp};
+#                                                                                                           #
+#############################################################################################################
+
 #############################################################################################################
 #                                                                                                           #
 #  ================                                                                                         #
@@ -104,7 +115,7 @@ fi
 #   returns a random file name within /tmp/                                                                 #
 #                                                                                                           #
 randomfile() {
-  rdmf=/tmp/$RANDOM; while [ -e $rdmf ]; do rdmf=/tmp/$RANDOM ; done
+  rdmf=$TEMP_DIR/$RANDOM; while [ -e $rdmf ]; do rdmf=$TEMP_DIR/$RANDOM ; done
   echo $rdmf ;
 }
 #                                                                                                           #
-- 
GitLab