# Arg. #2: Destination filename.
static_fetch_patches_list()
{
+ local wget_status
+
PATCHES_URL=${1}
PATCHES_LIST_FILENAME=${2}
# Appending a slash (/) will download the directory content as a file named
# index.html
- ${WGETCMD} "${PATCHES_URL}/" &&
+ ${WGETCMD} "${PATCHES_URL}/"
+ wget_status=$?
# Append log to global log file
- cat ${WGET_LOG_FILE} >> ${LFS_LOG_FILE} &&
+ cat ${WGET_LOG_FILE} >> ${LFS_LOG_FILE}
- mv ${LFS_PKG_DIR}/index.html ${PATCHES_LIST_FILENAME}
+ if [ ${wget_status} -eq 0 ]; then
+ mv ${LFS_PKG_DIR}/index.html ${PATCHES_LIST_FILENAME}
+ else
+ return 1
+ fi
}
# Arg. #1: If "test" is specified, set TEST_INTEGRITY to 1