X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Ffpkg;h=2d3b474613305b0ece484d7e1b33d32cd54e6933;hb=564ec1bbb321286571c30da20b81620c33b18e6f;hp=c420d7ba0b2f92e12033b221104032a31861dc98;hpb=16c81190b3ca1da2e26645020dd3cb9f8625521c;p=hvlinux.git diff --git a/functions/fpkg b/functions/fpkg index c420d7b..2d3b474 100644 --- a/functions/fpkg +++ b/functions/fpkg @@ -165,8 +165,8 @@ detect_file_not_found() { # HTTP: will return "ERROR 404: Not Found" # FTP: will say "File not found" or "No such file" - if grep --ignore-case -e "not found" -e "no such file" ${WGET_LOG_FILE} \ - 1> /dev/null 2>&1; then + if grep -q --ignore-case -e "not found" -e "no such file" ${WGET_LOG_FILE}; \ + then #echo "404 NOTFOUND" return 0 fi @@ -215,8 +215,7 @@ static_getpkg() # Failure: if it was a connection timeout, don't try for other file # extensions. - if grep "failed: Connection timed out" ${WGET_LOG_FILE} \ - 1> /dev/null 2>&1; then + if grep -q "failed: Connection timed out" ${WGET_LOG_FILE}; then echo "Error, wget reported: Connection timed out" return 1 fi @@ -550,9 +549,10 @@ fpkg() # Rename any patch fetched (in fpkg call) and replace SOURCE by TARGET # in patch name. - if ls ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch 1> /dev/null 2>&1; then - echo "CMD=${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch" - rename ${SRC_FILENAME} ${PACK} ${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch + local PATCHES_LIST="${LFS_PKG_DIR}/${SRC_FILENAME}-*.patch" + if ls ${PATCHES_LIST} 1> /dev/null 2>&1; then + echo "CMD=${SRC_FILENAME} ${PACK} ${PATCHES_LIST}" + rename ${SRC_FILENAME} ${PACK} ${PATCHES_LIST} fi fi }