[GenABEL-dev] [Genabel-commits] r1496 - pkg/GenABEL-general/scripts

L.C. Karssen lennart at karssen.org
Fri Dec 20 08:58:09 CET 2013


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, noreply at r-forge.r-project.org wrote:
> 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='http://cran.xl-mirror.nl')" > install_fresh_R_packages.R
> +echo "install.packages(\"mvtnorm\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"methods\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"MASS\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"utils\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
>  echo
> +echo An R package qvalue is being installed from Bioconductor...
> +#echo "install.packages(\"qvalue\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "source(\"http://bioconductor.org/biocLite.R\")" >> install_fresh_R_packages.R
> +echo "biocLite(\"qvalue\")" >> install_fresh_R_packages.R
> +echo "install.packages(\"genetics\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"haplo.stats\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"hglm\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"PredictABEL\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"VariABEL\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +echo "install.packages(\"bigRR\", repos='http://cran.xl-mirror.nl')" >> install_fresh_R_packages.R
> +R -f install_fresh_R_packages.R
> +rm -rf install_fresh_R_packages.R
>  
> -echo "install.packages(\"roxygen2\", repos='http://cran.us.r-project.org')" > install_roxygen_file.R
> -echo "install.packages(\"mvtnorm\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"methods\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"MASS\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"utils\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"qvalue\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"genetics\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"haplo.stats\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"hglm\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"PredictABEL\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"VariABEL\", repos='http://cran.us.r-project.org')" >> install_roxygen_file.R
> -echo "install.packages(\"bigRR\", repos='http://cran.us.r-project.org')" >> 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
> Genabel-commits at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/genabel-commits
> 

-- 
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
L.C. Karssen
Utrecht
The Netherlands

lennart at karssen.org
http://blog.karssen.org
GPG key ID: A88F554A
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: OpenPGP digital signature
URL: <http://lists.r-forge.r-project.org/pipermail/genabel-devel/attachments/20131220/6d7a6984/attachment.sig>


More information about the genabel-devel mailing list