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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jun 23 12:38:59 CEST 2014


Author: lckarssen
Date: 2014-06-23 12:38:58 +0200 (Mon, 23 Jun 2014)
New Revision: 1755

Modified:
   pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh
   pkg/GenABEL-general/distrib_scripts/makedistrib_MetABEL.sh
   pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh
Log:
distrib_support_functions.sh:
- Moved 'set -e' from the functions file to the distrib scripts again, otherwise it would only be set within the init function instead of the whole script.
- Fixed a missing # character

makedistrib_MetABEL.sh, makedistrib_Variable.sh:
- Added 'set -e'
- Added 'set -u' to warn about uninitialised variables. This led to the discovery of a missing {} around the $PKG_ part. 
- Fixed $PKG_ tp ${PKG}_


Modified: pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh	2014-06-20 13:46:30 UTC (rev 1754)
+++ pkg/GenABEL-general/distrib_scripts/distrib_support_functions.sh	2014-06-23 10:38:58 UTC (rev 1755)
@@ -10,15 +10,11 @@
 init_buildenv () {
     CRAN_repo='"http://cran-mirror.cs.uu.nl"'
     RCMD="R --vanilla CMD"
-
-    # Exit on errors
-    set -e
-
 }
 
 
 #######################################################################
-Install any missing dependencies
+# Install any missing dependencies
 #######################################################################
 install_deps () {
     # In order not to mess with the current user's R library directory we
@@ -92,7 +88,7 @@
     else
         echo
         echo "Successfully checked and built the $PKG package."
-        echo "Don't forget to increase the package version number if
-        you haven't already done so."
+        echo -n "Don't forget to increase the package version number "
+        echo "if you haven't already done so."
     fi
 }

Modified: pkg/GenABEL-general/distrib_scripts/makedistrib_MetABEL.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/makedistrib_MetABEL.sh	2014-06-20 13:46:30 UTC (rev 1754)
+++ pkg/GenABEL-general/distrib_scripts/makedistrib_MetABEL.sh	2014-06-23 10:38:58 UTC (rev 1755)
@@ -13,6 +13,10 @@
 
 PKG=MetABEL
 
+# 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)
@@ -46,17 +50,17 @@
 echo "Removing old files and directories (if present)"
 echo "--------------------------------------------------"
 if [ $NOCHECKOUT == false ]; then
-    rm -rf $PKG
+    rm -rf ${PKG}
 fi
-rm -rf $PKG.Rcheck
-rm -rf $PKG_*.tar.gz
+rm -rf ${PKG}.Rcheck
+rm -rf ${PKG}_*.tar.gz
 
 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
+    svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/${PKG}
 fi
 
 install_deps

Modified: pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh
===================================================================
--- pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh	2014-06-20 13:46:30 UTC (rev 1754)
+++ pkg/GenABEL-general/distrib_scripts/makedistrib_VariABEL.sh	2014-06-23 10:38:58 UTC (rev 1755)
@@ -13,6 +13,10 @@
 
 PKG=VariABEL
 
+# 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)
@@ -46,10 +50,10 @@
 echo "Removing old files and directories (if present)"
 echo "--------------------------------------------------"
 if [ $NOCHECKOUT == false ]; then
-    rm -rf $PKG
+    rm -rf ${PKG}
 fi
-rm -rf $PKG.Rcheck
-rm -rf $PKG_*.tar.gz
+rm -rf ${PKG}.Rcheck
+rm -rf ${PKG}_*.tar.gz
 rm -rf DatABEL DatABEL.*
 rm -rf filevector*
 
@@ -60,8 +64,8 @@
     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/$PKG
-    cd $PKG
+    svn export svn://svn.r-forge.r-project.org/svnroot/genabel/pkg/${PKG}
+    cd ${PKG}
     rm -f cleanup* configure* *.R
     cd src
     cp DAlib/*.c* .



More information about the Genabel-commits mailing list