<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Thanks Lennart. That's very usefull.<br>
      best,<br>
      Maksim<br>
      <br>
      On 20/12/2013 14:58, L.C. Karssen wrote:<br>
    </div>
    <blockquote cite="mid:52B3F891.8000301@karssen.org" type="cite">
      <pre wrap="">Hi Maksim,

Thanks for making this comprehensive script. Once I've got the new
Jenkins server up I will also incorporate it in there.

One suggestion: Instead of having all these lines like:
 echo "install.packages(\"pkg", repos='http.url')" > install.R
you can try the following (a so-called HERE document):

repo="http.url"   # Making a variable seems handy

cat <<EOF > install.R
install.packages("pkg", repos="$repo")
install.packages("pkg2", repos="$repo")
etc.
EOF

The idea behind a HERE document is that you continue adding to it until
you reached fixed string (EOF in this case, but you can use any string
you want).
Saves you a lot of typing and quotes.


Best,

Lennart.


On 20-12-13 04:56, <a class="moz-txt-link-abbreviated" href="mailto:noreply@r-forge.r-project.org">noreply@r-forge.r-project.org</a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">Author: maksim
Date: 2013-12-20 04:56:16 +0100 (Fri, 20 Dec 2013)
New Revision: 1496

Modified:
   pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh
Log:
Some bugs fixed. The R package qvalue is installed from Bioconductor now because CRAN deleted it from its repository. Now the ready GenABEL distributive is in the GenABEL_DISTRIBUTIVE_IS_HERE directory after the script finished. You should check out all the warning messages in output before using the distributive.

Modified: pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh
===================================================================
--- pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh  2013-12-20 03:09:34 UTC (rev 1495)
+++ pkg/GenABEL-general/scripts/makedistrib_GenABEL.sh  2013-12-20 03:56:16 UTC (rev 1496)
@@ -4,19 +4,15 @@
 
 
 
-echo
 echo Remove GenABEL_version_for_submission...
-echo
 rm -rf $installation_dir
 echo
 echo Create GenABEL_version_for_submission...
-echo
 mkdir GenABEL_version_for_submission
 cd GenABEL_version_for_submission
 
 echo
 echo Extract packages from r-forge...
-echo
 svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/filevector
 svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/DatABEL
 svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/MetABEL
@@ -29,31 +25,33 @@
 
 echo
 echo Install the freshest R packages from CRAN repository...
+
+echo "install.packages(\"roxygen2\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" > install_fresh_R_packages.R
+echo "install.packages(\"mvtnorm\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"methods\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"MASS\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"utils\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
 echo
+echo An R package qvalue is being installed from Bioconductor...
+#echo "install.packages(\"qvalue\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "source(\<a class="moz-txt-link-rfc2396E" href="http://bioconductor.org/biocLite.R\">"http://bioconductor.org/biocLite.R\"</a>)" >> install_fresh_R_packages.R
+echo "biocLite(\"qvalue\")" >> install_fresh_R_packages.R
+echo "install.packages(\"genetics\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"haplo.stats\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"hglm\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"PredictABEL\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"VariABEL\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+echo "install.packages(\"bigRR\", repos='<a class="moz-txt-link-freetext" href="http://cran.xl-mirror.nl">http://cran.xl-mirror.nl</a>')" >> install_fresh_R_packages.R
+R -f install_fresh_R_packages.R
+rm -rf install_fresh_R_packages.R
 
-echo "install.packages(\"roxygen2\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" > install_roxygen_file.R
-echo "install.packages(\"mvtnorm\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"methods\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"MASS\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"utils\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"qvalue\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"genetics\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"haplo.stats\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"hglm\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"PredictABEL\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"VariABEL\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-echo "install.packages(\"bigRR\", repos='<a class="moz-txt-link-freetext" href="http://cran.us.r-project.org">http://cran.us.r-project.org</a>')" >> install_roxygen_file.R
-R -f install_roxygen_file.R
-rm -rf install_roxygen_file.R
 
 
 
 
 
-
 echo
 echo Build and install packages...
-echo
 
 R CMD build DatABEL
 R CMD INSTALL DatABEL_*
@@ -72,8 +70,6 @@
 PATH="$PATH:$probabel_src_location"
 echo Search ProbABEL executive files in $probabel_src_location
 
-R CMD build MixABEL
-R CMD INSTALL MixABEL_*
 
 cd GenABEL.data
 rm -rf inst R
@@ -86,10 +82,9 @@
 
 echo
 echo Build, check and install GenABEL...
-echo
 # clean up the dev-version for distrib
 cd GenABEL
-rm cleanup* configure* *.R
+rm -rf cleanup* configure* *.R
 cd src
 cp DAlib/*.c* .
 cp DAlib/*.h* .
@@ -110,22 +105,42 @@
 # end cleanup
 
 R CMD check GenABEL
-R CMD INSTALL GenABEL
+R CMD build GenABEL
+R CMD INSTALL GenABEL_*
 
+
+
+
+R CMD build MixABEL
+R CMD INSTALL MixABEL_*
+
+
 echo
 echo Build the tutorial...
-echo
 # build the tutorial
 cd GenABEL_general
 make
 cd ..
+
+if [ -f GenABEL_general/GenABEL-tutorial.pdf ];
+then
 cp GenABEL_general/GenABEL-tutorial.pdf GenABEL/inst/doc/.
-# end build the tutorial
-
 echo
 echo Build the working version of GenABEL...
-echo
 R CMD build GenABEL
+mkdir GenABEL_DISTRIBUTIVE_IS_HERE
+cp GenABEL_*gz GenABEL_DISTRIBUTIVE_IS_HERE
+echo "The distributive of GenABEL is in $installation_dir/GenABEL_DISTRIBUTIVE_IS_HERE directory. Check out that there were no errors/warnings during running this script."
+echo "GenABEL building DONE!"
+else
+  echo "ERROR: File GenABEL_general/GenABEL-tutorial.pdf does not exist. It should have been generated after runing a make command in the GenABEL_general directory. Something did not work out."
+  echo "Making GenABEL_general/GenABEL-tutorial.pdf was the last step in building GenABEL. Figure out what has happned, create GenABEL_general/GenABEL-tutorial.pdf by running the command make in the GenABEL_general dir, copy it in GenABEL/inst/doc/ and run R CMD build GenABEL."
+fi
 
+
+
+# end build the tutorial
+
+
 # and do not forget to run R CMD check --as-cran!
 

_______________________________________________
Genabel-commits mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Genabel-commits@lists.r-forge.r-project.org">Genabel-commits@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits</a>

</pre>
      </blockquote>
      <pre wrap="">
</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
genabel-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:genabel-devel@lists.r-forge.r-project.org">genabel-devel@lists.r-forge.r-project.org</a>
<a class="moz-txt-link-freetext" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-devel</a></pre>
    </blockquote>
    <br>
  </body>
</html>