From patchwork Sun May 12 19:08:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Clement Chauplannaz X-Patchwork-Id: 2555841 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 553AB3FE1F for ; Sun, 12 May 2013 19:09:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241Ab3ELTJB (ORCPT ); Sun, 12 May 2013 15:09:01 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:37242 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751222Ab3ELTJA (ORCPT ); Sun, 12 May 2013 15:09:00 -0400 Received: by mail-wi0-f172.google.com with SMTP id ey16so217677wid.11 for ; Sun, 12 May 2013 12:08:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references; bh=jXABeFBRJmhUIlQVaVsYRXh5mgo02WsoFPlDz+B62ws=; b=OIHqcKl6kUa7kxvoBNzz4zA9BlvjjoxeFeUyevBVfi8Hmh2tgeH6EgvuIBHELv371b h6Zu2G6KMNbzeIczNV5v+BdD6t54VgAQUXRRUuyqqm6XrIMK2yHcwX9U6YdnGW0EVacw Q5/AXgpiems/nA80pZjtLTW1cSogoKxR4uMTjGvGwFtAHu+o6HjzJeopkKTuLkN8/qQW sKd2y6WKIaNdSJ3Z3b52Y2xV8JpFhTYyuM6ElpaieHmJ3qAJDp4wv1EmBlFNSlzq2SVS JOFiKobKgZ+p0LGbM3+YUm/o5reIo7LZves2rehb+mJinUHMwIlUQmBzmf3NvVC31gZm VXZQ== X-Received: by 10.194.79.135 with SMTP id j7mr15263594wjx.48.1368385739284; Sun, 12 May 2013 12:08:59 -0700 (PDT) Received: from localhost.localdomain (67.7.75.86.rev.sfr.net. [86.75.7.67]) by mx.google.com with ESMTPSA id bs20sm11244660wib.0.2013.05.12.12.08.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 12 May 2013 12:08:58 -0700 (PDT) From: Clement Chauplannaz To: linux-kbuild@vger.kernel.org Cc: mmarek@suse.cz, andi@firstfloor.org, yann.morin.1998@free.fr Subject: [PATCH 1/2] scripts/config: replace hard-coded script name by a dynamic value Date: Sun, 12 May 2013 21:08:51 +0200 Message-Id: <9442eebf0117a0d975ca766ea84efec4ad58c6d0.1368379475.git.chauplac@gmail.com> X-Mailer: git-send-email 1.8.3.rc1.44.gb387c77.dirty In-Reply-To: References: In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The script `config' prints its name in usage() function. It is currently hard-coded to value `config'. However, the script may be reused under a different name in contexts other than the Linux Kernel. Replace the hard-coded value `config' by the name of the script at runtime. Signed-off-by: Clement Chauplannaz Acked-by: Andi Kleen --- scripts/config | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scripts/config b/scripts/config index bb4d3de..6b3272e 100755 --- a/scripts/config +++ b/scripts/config @@ -1,6 +1,8 @@ #!/bin/bash # Manipulate options in a .config file from the command line +myname=${0##*/} + # If no prefix forced, use the default CONFIG_ CONFIG_="${CONFIG_-CONFIG_}" @@ -8,7 +10,7 @@ usage() { cat >&2 <