- Rework the way options are handled in that script (use case/esac instead

of a lot of if/fi).
- Allow to pass an URL to the script, to launch a specific testsuite from
  the URL of a tarball (without getting LATEST and so on).
This commit is contained in:
Laurent Rineau 2010-02-02 14:50:29 +00:00
parent fc18123f79
commit f1ea08f8d4
1 changed files with 41 additions and 30 deletions

View File

@ -232,11 +232,15 @@ abort_if_latest_already_tested()
# ---------------------------------------------------------------------------------------- # ----------------------------------------------------------------------------------------
get_cgal() get_cgal()
{ {
if [ -z "$CGAL_LOCATION" ]; then
for i in `cat LATEST` for i in `cat LATEST`
do do
CGAL_LOCATION="${CGAL_URL}/${i}"; CGAL_LOCATION="${CGAL_URL}/${i}";
CGAL_ZIPFILE="${i}"; CGAL_ZIPFILE="${i}";
done done
else
CGAL_ZIPFILE=`echo "$CGAL_LOCATION" | sed 's|.*/||'`
fi
CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"` CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"`
if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then if [ ! "${CGAL_RELEASE_ID}" = "${CGAL_ZIPFILE}" ]; then
@ -782,29 +786,30 @@ put_on_web()
# Parse command line arguments # Parse command line arguments
for arg in "$@" for arg in "$@"
do do
if [ "$arg" = "-c" ]; then case "$arg" in
"-c")
echo "Using latest unzipped release instead of getting a new one from the server" echo "Using latest unzipped release instead of getting a new one from the server"
USE_LATEST_UNZIPPED="y" USE_LATEST_UNZIPPED="y"
fi ;;
"-l")
if [ "$arg" = "-l" ]; then
echo "Not uploading results to dashboard" echo "Not uploading results to dashboard"
DO_NOT_UPLOAD="y" DO_NOT_UPLOAD="y"
fi ;;
"-n")
if [ "$arg" = "-n" ]; then
# echo "No testsuite will be launched. Installation only." # echo "No testsuite will be launched. Installation only."
DO_NOT_TEST="y" DO_NOT_TEST="y"
fi ;;
"-s")
if [ "$arg" = "-s" ]; then
echo "Showing progress." echo "Showing progress."
SHOW_PROGRESS="y" SHOW_PROGRESS="y"
fi ;;
if [ "$arg" = "-k" ]; then "-k")
echo "Compiled test/ directory will be kept." echo "Compiled test/ directory will be kept."
KEEP_TESTS="y" KEEP_TESTS="y"
fi ;;
*)
CGAL_LOCATION=$arg
esac
done done
# Load settings # Load settings
@ -883,8 +888,10 @@ cd "$CGAL_ROOT"
# Starts the process # Starts the process
if [ -z "${USE_LATEST_UNZIPPED}" ]; then if [ -z "${USE_LATEST_UNZIPPED}" ]; then
if [ -z "$CGAL_LOCATION" ]; then
download_latest download_latest
abort_if_latest_already_tested abort_if_latest_already_tested
fi
get_cgal get_cgal
unzip_cgal unzip_cgal
fi fi
@ -918,3 +925,7 @@ fi
rm -f $LOCK_FILE; rm -f $LOCK_FILE;
# EOF # EOF
## Local Variables:
## sh-basic-offset: 2
## End: