[Distr-commits] r922 - pkg/utils
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Sep 13 11:58:41 CEST 2013
Author: kroisand
Date: 2013-09-13 11:58:41 +0200 (Fri, 13 Sep 2013)
New Revision: 922
Modified:
pkg/utils/Rpkgcheck.sh
Log:
check routine adapted such that removing the old version of a library and installing the new happens only if the check succeeded
Modified: pkg/utils/Rpkgcheck.sh
===================================================================
--- pkg/utils/Rpkgcheck.sh 2013-09-13 09:00:26 UTC (rev 921)
+++ pkg/utils/Rpkgcheck.sh 2013-09-13 09:58:41 UTC (rev 922)
@@ -4,16 +4,16 @@
export _R_CHECK_SUGGESTS_ONLY_=true
#
echo ---------------------------------------------
-echo start full package check
+echo start full package check of $2
echo ---------------------------------------------
#
echo ---------------------------------------------
-echo remove old tar.gz
+echo remove old tar.gz of $2
echo ---------------------------------------------
rm -f $2*.tar.gz
#
echo ---------------------------------------------
-echo build
+echo build $2
echo ---------------------------------------------
$1 CMD build --compact-vignettes="gs+qpdf" --resave-data $2
#
@@ -23,22 +23,34 @@
echo ---------------------------------------------
#
echo ---------------------------------------------
-echo check as cran
+echo check as cran $tarGz
echo ---------------------------------------------
$1 CMD check --as-cran --timings $tarGz
+result=$?
#
echo ---------------------------------------------
-echo REMOVE
+echo we test that the check of $2 was successful
+echo i.e. whether the value of check,
+echo which is $result, is 0
+echo before removing the old version
+echo and installing the new version
echo ---------------------------------------------
-$1 CMD REMOVE $2
-#
-echo ---------------------------------------------
-echo INSTALL
-echo ---------------------------------------------
-$1 CMD INSTALL \
- --byte-compile --with-keep.source --compact-docs \
- --resave-data --install-tests --example \
- --html --latex --clean --preclean \
- --compile-both \
- $tarGz
+zero=0
+if [ $result -eq $zero ]; then
+ #
+ echo ---------------------------------------------
+ echo REMOVE $2
+ echo ---------------------------------------------
+ $1 CMD REMOVE $2
+ #
+ echo ---------------------------------------------
+ echo INSTALL $2
+ echo ---------------------------------------------
+ $1 CMD INSTALL \
+ --byte-compile --with-keep.source --compact-docs \
+ --resave-data --install-tests --example \
+ --html --latex --clean --preclean \
+ --compile-both \
+ $tarGz
+fi
More information about the Distr-commits
mailing list