@@ -59,6 +59,10 @@ There are basically two ways to use R package checker :
# Usage
---
Basically you can either check a specific package OR just give a list of packages to run R CMD CHECK on them.
The "-c" Bash script option allows you to directly give a list of packages to check. This option is not compatible with giving a package to test ("-p" option).
## Direct Bash call
This is the simple way to use the R package checker. The script prints current steps in stdout and all R output files in the output directory (-d|--dest DESTINATION_DIRECTORY).
...
...
@@ -66,9 +70,10 @@ This is the simple way to use the R package checker. The script prints current s
-p | --package NAME_OF_PACKAGE_TO_TEST : name of package to test (case sensible), all packages depending on this package are going to be checked by their R CMD CHECK
-c | --checklist CHECKLIST_FILE : file listing packages you want to check (each line should look like : PKG_NAME,PKG_VERSION,anything)
-r | --repo PACKAGE_TO_TEST_REPO : repository of package you want to test (DEFAULT : R-CRAN)
-l | --libuser R_LIBS_USER : directory where packages depending on PACKAGE_TO_TEST are going to be installed (DEFAULT : R will choose it)
This directory can be used several times for several tests. Using same directory several times will save time.
echo"`basename$0` is a tool to test that a R package (PACKAGE_TO_TEST) does not break packages that depend on it by running 'R CMD check' for each of them.
-p | --package NAME_OF_PACKAGE_TO_TEST : name of package to test (case sensible), all packages depending on this package are going to be checked by their R CMD CHECK
-c | --checklist CHECKLIST_FILE : file listing packages you want to check (each line should look like : PKG_NAME,PKG_VERSION,anything)
-r | --repo PACKAGE_TO_TEST_REPO : repository of package you want to test (DEFAULT : R-CRAN)
-l | --libuser R_LIBS_USER : directory where packages depending on PACKAGE_TO_TEST are going to be installed (DEFAULT : R will choose it)
This directory can be used several times for several tests. Using same directory several times will save time.
...
...
@@ -225,7 +226,7 @@ Don't forget to set JAVA_HOME if some dependencies need java, which is quite pro
MAIL_SUBJECT_BEGIN="List of packages \"$CHECKLIST_FILE\""
if![-f$CHECKLIST_FILE];then
echo"List file $CHECKLIST_FILE not found...
"
exit
fi
else
echo"You have to set a non-empty CHECKLIST_FILE path
"
printUsage
exit
fi
shift;
;;
-x|--xvfb)
shift;
if[-n"$1"];then
...
...
@@ -376,20 +412,31 @@ while true; do
esac
done
# getting non-option arguments : THE MAIN ONE : PACKAGE_TO_TEST !
# only last non-option argument will be taken
shift;
while[-n"$1"];do
PACKAGE_TO_TEST=$1
shift
done
## getting non-option arguments : THE MAIN ONE : PACKAGE_TO_TEST !
## only last non-option argument will be taken
#shift;
#while [ -n "$1" ]; do
# PACKAGE_TO_TEST=$1
# shift
#done
if![-n"$PACKAGE_TO_TEST"];then
echo"There must be a package to test
if![-n"$CHECKLIST_FILE"];then
echo"
There must be a package to test OR a CHECKLIST_FILE.
"
printUsage
exit
fi
else
if[-n"$CHECKLIST_FILE"];then
echo"
There must choose between testing a specific package (R CMD CHECK on all packages depending on it) OR checking a given list of packages.
In other words : choose between -p and -c option
"
exit
fi
fi
#### DEFAULT VALUES management
...
...
@@ -403,7 +450,11 @@ if [ $RESULTURLFLAG == 0 ]; then
fi
# RECAP OF ALL PARAMS
echo"PACKAGE TO TEST : $PACKAGE_TO_TEST"
if[-n"$PACKAGE_TO_TEST"];then
echo"PACKAGE TO TEST : $PACKAGE_TO_TEST . Last version of $PACKAGE_TO_TEST and all packages depending on $PACKAGE_TO_TEST will be installed and checked"
else
echo"LIST OF PACKAGES TO INSTALL AND CHECK : $CHECKLIST_FILE"
fi
if[-n"$R_LIBS_USER"];then
echo"R_LIBS_USER : $R_LIBS_USER"
else
...
...
@@ -442,7 +493,7 @@ $RESULT_URL
Your test directory is named `basename$DESTINATION`
" | mail -s"Package \"$PACKAGE_TO_TEST\" R check started (`basename$DESTINATION`)"$MAILTO
" | mail -s"$MAIL_SUBJECT_BEGIN R check started (`basename$DESTINATION`)"$MAILTO
fi
######## FILE management
...
...
@@ -457,22 +508,24 @@ if [[ $HTMLFLAG == 1 ]]; then
echo
fi
echo
printLeftPurple "Generation of depends.R ... started at `date'+%H:%M:%S'` ... "