From patchwork Sat Feb 9 20:23:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas De Schampheleire X-Patchwork-Id: 1039286 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="b1FekXxr"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43xk6C2wFWz9sNG for ; Sun, 10 Feb 2019 07:24:03 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 239052441E; Sat, 9 Feb 2019 20:23:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D3Yldam+kKzc; Sat, 9 Feb 2019 20:23:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 9895D23B9B; Sat, 9 Feb 2019 20:23:55 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 40C951BF82F for ; Sat, 9 Feb 2019 20:23:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3EB7423A53 for ; Sat, 9 Feb 2019 20:23:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qLaqEnVEQd+v for ; Sat, 9 Feb 2019 20:23:53 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) by silver.osuosl.org (Postfix) with ESMTPS id 0BB372381E for ; Sat, 9 Feb 2019 20:23:53 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id d9so713833edh.12 for ; Sat, 09 Feb 2019 12:23:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=SIm1aW9sW3N9qVWt3pjCMS7i8tK8OL5Ky88aM8rV+8g=; b=b1FekXxrWmwQz41Xe2sCVp4N4REr1Je91POFsviWovnEFoIv9zL6wb2BUNbeFQwq7i Z3Wgpfo12NTae+OsI/fwp0SpzUPBRAkiolsYK/vsa4suv24Y5FJMJZPyq+XFNlnx08Vu siNW6T9XOFEAHnvSptotCxBSVGcYnegqE4x1YLIuSjrIjy2i2if8FsY+i//vlWnUla9m CSGX2ljMzBv/Fy3TcPkuT5BMAgCLfvnXMyNIplNbQ7fqXjuv9PHIPblwqRbgBuYo0VMP Z24WExVIrWufLgQJpLn6HD/VZyPVzX4Kk1K94rksW1T1MLv9N3DY1pCK54Lsg5ebCoH4 iV0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=SIm1aW9sW3N9qVWt3pjCMS7i8tK8OL5Ky88aM8rV+8g=; b=ctHEJhgJc00gSd6Nd/vsbJKq1mOj0vAAq009umS5CWVmOU2CwQRTiXc3UMySQtsQrk Yxo3ic95bOFGmv5pLUewRO9mJC/0IyaF+6WEc0ovdmUiVeip7y7IGiMJ8m6vjXUwswUO AnNm+VK/EogtQZ5de9v48T4GlzsdX7UuCJn12ipQnkJPMfXVgWCadyVbTEaL3Xz7S9g1 QuSFcoLPfIvaUg+1IGGgv0iRA2BzOICH6yo0B/mt5czNw2iSsXoVbXM5IrzFpRlRRwEX aMlpY1pCUoZpCFbuDkf+O+bWEJBpXNnid7gj02T7/UkJTdhuNkp2GXN5Ce/yscd1Z8xJ sfuw== X-Gm-Message-State: AHQUAuaaASOzpkHImGUHFiFEWr7qu9sEFyswTsDeq3N88dks0DX6SJpO BirGlIbZ5gwprvMpxrNhZ560utcmkNg= X-Google-Smtp-Source: AHgI3Ia9FnPJCNOmuvOWTnTTDfgE2CRx5+jsKB/Xcu4aMnL0MsQ8XO50UWa4391yqdP17Ba1mUThHw== X-Received: by 2002:a17:906:1248:: with SMTP id u8mr8186952eja.33.1549743831192; Sat, 09 Feb 2019 12:23:51 -0800 (PST) Received: from localhost.localdomain (d54C493B0.access.telenet.be. [84.196.147.176]) by smtp.gmail.com with ESMTPSA id j16sm492310edt.81.2019.02.09.12.23.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 09 Feb 2019 12:23:50 -0800 (PST) From: Thomas De Schampheleire To: buildroot@buildroot.org Date: Sat, 9 Feb 2019 21:23:45 +0100 Message-Id: <20190209202350.4984-3-patrickdepinguin@gmail.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190209202350.4984-1-patrickdepinguin@gmail.com> References: <20190209202350.4984-1-patrickdepinguin@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCHv3 3/7] support/download/wget: implement source-check X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Yann E. MORIN" , Thomas De Schampheleire Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Thomas De Schampheleire Signed-off-by: Thomas De Schampheleire --- support/download/wget | 7 +++++++ 1 file changed, 7 insertions(+) v3: no changes diff --git a/support/download/wget b/support/download/wget index c69e6071aa..7f631ebb61 100755 --- a/support/download/wget +++ b/support/download/wget @@ -7,6 +7,7 @@ set -e # # Options: # -q Be quiet. +# -C Only check that the file exists remotely. # -o FILE Save into file FILE. # -f FILENAME The filename of the tarball to get at URL # -u URL Download file at URL. @@ -19,6 +20,7 @@ verbose= while getopts "${BR_BACKEND_DL_GETOPTS}" OPT; do case "${OPT}" in q) verbose=-q;; + C) checkonly=1;; o) output="${OPTARG}";; f) filename="${OPTARG}";; u) url="${OPTARG}";; @@ -40,4 +42,9 @@ _wget() { # mirror [ -n "${encode}" ] && filename=${filename//\?/%3F} +if [ -n "${checkonly}" ]; then + _wget --spider ${verbose} "${@}" "'${url}/${filename}'" + exit ${?} +fi + _wget ${verbose} "${@}" -O "'${output}'" "'${url}/${filename}'"