Skip to content
Snippets Groups Projects
Commit 834a263c authored by Alexis  CRISCUOLO's avatar Alexis CRISCUOLO
Browse files

2.01

parent 0039402f
No related branches found
No related tags found
No related merge requests found
......@@ -70,12 +70,13 @@
#############################################################################################################
# #
# ================ #
# = MANUAL = #
# = FUNCTIONS = #
# ================ #
# #
# = mandoc() ============================================================================================= #
# prints the doc #
# #
if [ "$1" == "-h" ] || [ $# -lt 1 ]
then
mandoc() {
echo -e "\n\033[1m contig_info v$VERSION $COPYRIGHT\033[0m";
cat <<EOF
......@@ -93,16 +94,7 @@ then
-h prints this help and exits
EOF
[ "$1" == "-h" ] && exit 0 || exit 1 ;
fi
# #
#############################################################################################################
#############################################################################################################
# #
# ================ #
# = FUNCTIONS = #
# ================ #
}
# #
# = randomfile() ========================================================================================= #
# creates a random file within $TEMP_DIR and returns its name #
......@@ -118,6 +110,8 @@ randomfile() {
#### INITIALIZING PARAMETERS AND READING OPTIONS ####
#### ####
#############################################################################################################
if [ $# -lt 1 ]; then mandoc ; exit 1 ; fi
export LC_ALL=C;
MIN_CONTIG_LGT=1;
......@@ -125,15 +119,15 @@ GENOME_SIZE=0;
RES_CONTENT=false;
TSVOUT=false;
while getopts m:g:tr option
while getopts m:g:trh option
do
case $option in
m) MIN_CONTIG_LGT=$OPTARG ;;
g) GENOME_SIZE=$OPTARG ;;
r) RES_CONTENT=true ;;
t) TSVOUT=true ;;
:) echo "option $OPTARG : missing argument" ; exit 1 ;;
\?) echo "$OPTARG : option invalide" ; exit 1 ;;
m) MIN_CONTIG_LGT=$OPTARG ;;
g) GENOME_SIZE=$OPTARG ;;
r) RES_CONTENT=true ;;
t) TSVOUT=true ;;
h) mandoc ; exit 0 ;;
\?) mandoc ; exit 1 ;;
esac
done
if ! [[ $MIN_CONTIG_LGT =~ ^[0-9]+$ ]]; then echo " incorrect value (option -m): $MIN_CONTIG_LGT" >&2 ; exit 1 ; fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment