X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Ffpkg;h=eedc14dc18192ad43f067d1f63b7ca658d6476d2;hb=769abe2665103a85d34685c3e1fff5d04480c47a;hp=dfbafae4e5305c11de1e2728b337ec45351802ab;hpb=14ad1e23484d4394eea4a8d0386995190a05039d;p=hvlinux.git diff --git a/functions/fpkg b/functions/fpkg index dfbafae..eedc14d 100644 --- a/functions/fpkg +++ b/functions/fpkg @@ -154,17 +154,24 @@ wget_wrapper() # 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 @@ -210,7 +217,7 @@ update_packages_init() if [ -n "${USE_LFS_PATCHES}" ]; then # Getting list of all patches from LFS server. - rcmd "Fetching LFS patches list" static_fetch_patches_list \ + rcmd "Fetching LFS patches list" static_fetch_patches_list \ ${LFS_PATCHES_URL} ${LFS_PATCHES_LIST} fi @@ -237,6 +244,11 @@ static_checkpatch() local PATCHES_LIST=${2} local PATCHES_URL=${3} + # Make sure patch list file exists + if [ ! -f ${PATCHES_LIST} ]; then + return + fi + # Remplace les "+" par "%2B" local PACK_URL=$(echo $PACK | sed s!\+!%2B!g)