[Genabel-commits] r1788 - pkg/GenABEL-general/distrib_scripts

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Aug 10 14:54:43 CEST 2014


Author: lckarssen
Date: 2014-08-10 14:54:43 +0200 (Sun, 10 Aug 2014)
New Revision: 1788

Modified:
   pkg/GenABEL-general/distrib_scripts/makedistrib_MixABEL.sh
Log:
Updated the MixABEL makedistrib script to use the distrib_support_functions.sh, like makedistrib_MetABEL.sh, makedistrib_VariABEL.sh, etc.


Modified: pkg/GenABEL-general/distrib_scripts/makedistrib_MixABEL.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/makedistrib_MixABEL.sh	2014-08-10 11:12:38 UTC (rev 1787)
+++ pkg/GenABEL-general/distrib_scripts/makedistrib_MixABEL.sh	2014-08-10 12:54:43 UTC (rev 1788)
@@ -1,27 +1,90 @@
 #!/bin/bash
-rm -rf MixABEL*
+#
+# This script tries to package an R package by downloading it from the
+# SVN server. It includes the required R CMD checks before building
+# the package.
+#
+# Command line options:
+# -n|--nocheckout: if the first command line option is keepold the previously
+#   checked out source code will not be deleted and no SVN checkout will
+#   be done. This is handy when trying out some of your local changes.
+# -c|--nocrancheck: don't run R CMD check --as-cran (can save some
+#   time if you're expecting trouble)
+
+PKG=MixABEL
+
+# Exit on errors and when encountering uninitialised variables
+set -e
+set -u
+
+# Find the directory where this script (and others it depends on) are
+# located
+scriptdir=$(dirname $0)
+
+source $scriptdir/distrib_support_functions.sh
+init_buildenv
+
+# Parse command line options
+NOCHECKOUT=false
+CRANCHECK=true
+while [ $# -gt 0 ]; do
+    case $1 in
+        -n | --nocheckout )
+            NOCHECKOUT=true
+            ;;
+        -c | --nocrancheck )
+            CRANCHECK=false
+            ;;
+        -* )
+            echo "$0: invalid option $1" >&2
+            exit 1
+            ;;
+        *)
+            break
+            ;;
+    esac
+    shift
+done
+
+echo "--------------------------------------------------"
+echo "Removing old files and directories (if present)"
+echo "--------------------------------------------------"
+if [ $NOCHECKOUT == false ]; then
+    rm -rf ${PKG}
+fi
+rm -rf ${PKG}.Rcheck
+rm -rf ${PKG}_*.tar.gz
 rm -rf DatABEL DatABEL.*
 rm -rf filevector*
-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/MixABEL
-cd MixABEL
-rm cleanup* configure* *.R
-cd src
-cp DAlib/*.c* .
-cp DAlib/*.h* .
-cp ITERlib/*.c* .
-cp ITERlib/*.h* .
-cp fvlib/*.c* .
-cp fvlib/*.h* .
-cp MXlib/*.c* .
-cp MXlib/*.h* .
-rm DAlib
-rm fvlib
-rm -rf ITERlib
-rm -rf MXlib
-mv Makevars_distrib Makevars
-cd ../..
-R CMD check MixABEL
-R CMD build MixABEL
-# and do not forget to run R CMD check --as-cran!
+
+if [ $NOCHECKOUT == false ]; then
+    echo
+    echo "--------------------------------------------------"
+    echo "Checking out source code from SVN..."
+    echo "--------------------------------------------------"
+    SVNBASE=svn://svn.r-forge.r-project.org/svnroot/genabel/
+    svn export $SVNBASE/pkg/filevector
+    svn export $SVNBASE/pkg/DatABEL
+    svn export $SVNBASE/pkg/${PKG}
+
+    cd ${PKG}
+    rm -f cleanup* configure* *.R
+    cd src
+    cp DAlib/*.c* .
+    cp DAlib/*.h* .
+    cp ITERlib/*.c* .
+    cp ITERlib/*.h* .
+    cp fvlib/*.c* .
+    cp fvlib/*.h* .
+    cp MXlib/*.c* .
+    cp MXlib/*.h* .
+    rm DAlib
+    rm fvlib
+    rm -rf ITERlib
+    rm -rf MXlib
+    mv Makevars_distrib Makevars
+    cd ../..
+fi
+
+install_deps
+run_checks_build



More information about the Genabel-commits mailing list