Add support for USE_LATEST_UNZIPPED in autotest_cgal

That was already in autotest_cgal_using_cmake
This commit is contained in:
Laurent Rineau 2008-10-07 14:00:36 +00:00
parent 43cc745311
commit 8e2ce1e7ca
1 changed files with 95 additions and 80 deletions

View File

@ -398,12 +398,13 @@ copy_old_stuff()
fi
done
if [ -z "${USE_LATEST_UNZIPPED}" ]; then
# update symbolic links
rm ${OLD_CGAL_DIR}
ln -s `basename ${CGAL_DIR}` ${OLD_CGAL_DIR}
rm ${CURRENT_CGAL_DIR}
ln -s `basename ${CGAL_DIR}` ${CURRENT_CGAL_DIR}
fi
log_done ${ACTUAL_LOGFILE}
fi
@ -463,12 +464,17 @@ if [ "${CRITICAL}" = "y" ]; then
error "COULD NOT DETERMINE MYSHELL!"
fi
# that line makes the script remove the lock file in case of unwanted exit
trap "rm -f $LOCK_FILE" EXIT HUP INT TERM
lockfile -r 5 $LOCK_FILE;
if [ ${?} != 0 ]; then
echo "COULD NOT AQUIRE LOCK!";
exit 1;
fi
if [ -z "${USE_LATEST_UNZIPPED}" ]; then
if [ -r "LATEST" ]; then
rm -rf LATEST
fi
@ -515,6 +521,9 @@ fi
# (used to copy config/install files and evt. gmp stuff)
OLD_CGAL_DIR=${CGAL_ROOT}/CGAL-I
CURRENT_CGAL_DIR=${CGAL_ROOT}/${CGAL_CURRENT_RELEASE_ID}
else
CGAL_DIR=${CGAL_ROOT}/CGAL-I
fi
# you will guess it :)
CGAL_INCL_DIR=${CGAL_DIR}/include
@ -538,6 +547,7 @@ fi
# remove old logfile
rm -f ${ACTUAL_LOGFILE}
if [ -z "${USE_LATEST_UNZIPPED}" ]; then
# check, if OLD_CGAL_DIR exists and is a symbolic link
if [ ! -r ${OLD_CGAL_DIR} -o ! -d ${OLD_CGAL_DIR} ]; then
error "directory ${OLD_CGAL_DIR} does not exist"
@ -545,6 +555,7 @@ fi
if [ ! -h ${OLD_CGAL_DIR} ]; then
error "${OLD_CGAL_DIR} has to be a symbolic link"
fi
fi
if [ ! -r ${LOGS_DIR} ]; then
mkdir $LOGS_DIR
@ -581,9 +592,11 @@ main_procedure()
fi
done
fi
if [ -z "${USE_LATEST_UNZIPPED}" ]; then
get_cgal
unzip_cgal
copy_old_stuff
fi
build_cgal
if [ -z "${DO_NOT_TEST}" ]; then
run_test
@ -595,9 +608,11 @@ if [ "${BUILD_HOSTS}" = "localhost" ]; then
TEXT="`value_of COMPILERS_localhost`"
if [ -z "${TEXT}" ]; then
# printf "\nWARNING: Only installing on localhost\n";
if [ -z "${USE_LATEST_UNZIPPED}" ]; then
get_cgal
unzip_cgal
copy_old_stuff
fi
build_cgal;
else
main_procedure;