- if [ ! -f ${DEST_FILE} ]; then
- if [ -z "${TEST_INTEGRITY}" ]; then
- # Fetch package, unless we are testing integrity
+ if [ -z "${TEST_INTEGRITY}" ]; then
+ if [ -f ${DEST_FILE} -a -n "${ERASE_FIRST}" ]; then
+ rm ${DEST_FILE}
+ fi
+
+ if [ ! -f ${DEST_FILE} ]; then
+ # Fetch package