Author: moeller
Date: 2015-01-31 21:03:19 +0000 (Sat, 31 Jan 2015)
New Revision: 18686

Modified:
   trunk/community/edam/README.txt
   trunk/community/edam/debian2edam
Log:
Session with Herve - initial commit.

Modified: trunk/community/edam/README.txt
===================================================================
--- trunk/community/edam/README.txt     2015-01-31 18:22:26 UTC (rev 18685)
+++ trunk/community/edam/README.txt     2015-01-31 21:03:19 UTC (rev 18686)
@@ -10,3 +10,4 @@
 
 [1] http://edamontology.org/
 [2] http://www.yaml.org/
+[3] https://elixir-registry.cbs.dtu.dk

Modified: trunk/community/edam/debian2edam
===================================================================
--- trunk/community/edam/debian2edam    2015-01-31 18:22:26 UTC (rev 18685)
+++ trunk/community/edam/debian2edam    2015-01-31 21:03:19 UTC (rev 18686)
@@ -6,23 +6,29 @@
        cat - 1>&2
 }
 
+# echoindent outputs a series of blanks to STDOUT. An optional
+# second argument is echoed after those blanks if present.
 function echoindent () {
        for i in $(seq 1 $1)
        do
                echo -n " "
        done
+       if [ "" != "$2" ]; then
+               echo $2
+       fi
 }
 
+level=0
 # helper to properly close an open paranthesis
 function closeParenthesis () {
-                       level=$((level-1))
-                       echoindent $level
-                       echo -n ")"
-                       if [ -n "$1" ]; then
-                               echo "# $1"
-                       else
-                               echo
-                       fi
+       level=$(($level-1))
+       echoindent $level
+       echo -n ")"
+       if [ -n "$1" ]; then
+               echo "# $1"
+       else
+               echo
+       fi
 }
 
 # Key argument indicating the debian directory from which to retrieve all the
@@ -33,7 +39,13 @@
 
 # Variable keeping usage information
 USAGE=<<EOUSAGE
-debian2edam <path to 'debian' directory>
+debian2edam [--upload] <path to 'debian' directory> 
+
+server=https://
+Environment variables:
+elixir_cat_username
+elixir_cat_password 
+
 EOUSAGE
 
 filename=$(basename "$pathToDebian")
@@ -77,12 +89,10 @@
 
 if [ -n "$debug" ]; then cat debian/control; fi
 
-while read desc; do
-       d=$(echo "$desc"|sed -e 's/^[^:]*: *//')
-       echo Package: $d
-       #packages="$d"
-       #packages[1]="$d"
-       packages[${#packages[*]}]="$d"
+while read pack; do
+       p=$(echo "$pack"|sed -e 's/^[^:]*: *//')
+       echo Package: $p
+       packages[${#packages[*]}]="$p"
 done < <(grep "^Package:" debian/control )
 
 while read desc; do
@@ -122,7 +132,6 @@
 openfunction=0
 openscope=0
 indentlen=0
-level=0
 
 # Core part of the program
 # It reads every line of the EDAM file (see end of loop for the redirection)
@@ -199,7 +208,7 @@
                        openfunction=0
                fi
                echoindent $level
-               echo "(function";
+               echo "(function $val";
                level=$((level+1))
                openfunction=1
        elif [ "input" = "$type" -o "output" = "$type" ]; then


_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to