[Genabel-commits] r1581 - pkg/GenABEL-general/scripts
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Feb 3 15:56:01 CET 2014
Author: lckarssen
Date: 2014-02-03 15:56:00 +0100 (Mon, 03 Feb 2014)
New Revision: 1581
Modified:
pkg/GenABEL-general/scripts/makedistrib_MetABEL.sh
Log:
Add a command line option (-n or --nocheckout) to the makedistrib_MetABEL.sh script. If this option is used then the $PKG directory will not be deleted and no SVN checkout will be done. This allows you to copy files from your development dir into the $PKG dir so you can check whether they build correctly.
Modified: pkg/GenABEL-general/scripts/makedistrib_MetABEL.sh
===================================================================
--- pkg/GenABEL-general/scripts/makedistrib_MetABEL.sh 2014-02-03 13:51:44 UTC (rev 1580)
+++ pkg/GenABEL-general/scripts/makedistrib_MetABEL.sh 2014-02-03 14:56:00 UTC (rev 1581)
@@ -3,6 +3,11 @@
# 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.
PKG=MetABEL
CRAN_repo='"http://cran-mirror.cs.uu.nl"'
@@ -14,18 +19,40 @@
# located
scriptdir=$(dirname $0)
+# Parse command line options
+NOCHECKOUT=false
+while [ $# -gt 0 ]; do
+ case $1 in
+ -n | --nocheckout )
+ NOCHECKOUT=true
+ ;;
+ -* )
+ echo "$0: invalid option $1" >&2
+ exit 1
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
echo "--------------------------------------------------"
echo "Removing old files and directories (if present)"
echo "--------------------------------------------------"
-rm -rf $PKG
+if [ $NOCHECKOUT == false ]; then
+ rm -rf $PKG
+fi
rm -rf $PKG.Rcheck
rm -rf $PKG_*.tar.gz
-echo
-echo "--------------------------------------------------"
-echo "Checking out source code from SVN..."
-echo "--------------------------------------------------"
-svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/$PKG
+if [ $NOCHECKOUT == false ]; then
+ echo
+ echo "--------------------------------------------------"
+ echo "Checking out source code from SVN..."
+ echo "--------------------------------------------------"
+ svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/$PKG
+fi
# In order not to mess with the current user's R library directory we
# set one in /tmp. Most Linux distributions will remove the
More information about the Genabel-commits
mailing list