From patchwork Thu Dec 9 23:40:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 48740 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 718E83857C44 for ; Thu, 9 Dec 2021 23:48:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 718E83857C44 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1639093728; bh=rAPWZXamv2FDsLe2W50G0d5/PdDeMIwsJvZhV4VeKH8=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=LR5Y5dExxHCzXp4sv7rbmHu4RIA9pdmL4kqHYKaXtDlmAdDrcgufi5F97uljhsjmM bOiTHmYfbPFQcUyAatTLTkh+KNkjENnq38x6Bn0uJjpnREnfUzdnRX+KJ+DkGuJqTo B+qoOjX+z8Kmhz6f2I4n21hWjTP2PjHDnMp3W7sk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id BABFA3858033 for ; Thu, 9 Dec 2021 23:40:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BABFA3858033 Received: by mail-pl1-x632.google.com with SMTP id q17so5063623plr.11 for ; Thu, 09 Dec 2021 15:40:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rAPWZXamv2FDsLe2W50G0d5/PdDeMIwsJvZhV4VeKH8=; b=rxaRydP1Oar3b+CpElcQxe13mXl9oWnrieoaOwkDq82rQbySeMqEMuONweLwxmiElI qf8DkMgzlbyZtp3+9NrVRpJ59+vwk36LMRcod0LhwLDJ9TMyX3zM/t9sDQqnb6S+vu2H EO9AZXBInv6TsE7qKU7d24t4BEKJTosn6CFcnWUkPPiV+WD/WWeofq4BM0mrx51Z44C5 5JHLZ8PERegO0hH1qFyOSGmk5oUUybIm/Jo7ARjBA+OgVMfkdGFuylmXfinxLbyQUvAj kDazXpFyxGiyyXieKWXiMPCQmMCi8RrFESgB9/Er3iZkEhYPSHYzv4ksPxOZpxT3WufY VU1A== X-Gm-Message-State: AOAM532eSb41ZgltvZeGo9mCnama41v3TSIGxbCvjBaiDvw+u7q282dL lJSW/C7VFdFJXaiKIGbNytBDR4qHmsG28g== X-Google-Smtp-Source: ABdhPJxFwxwqf7cUHzKLmDTNe9Rk23HwFnChqE8U6omjb808TVsqkAd1y0/96wiKekqh5cvrljngDA== X-Received: by 2002:a17:90a:d3c3:: with SMTP id d3mr19373630pjw.209.1639093218463; Thu, 09 Dec 2021 15:40:18 -0800 (PST) Received: from apollo.hsd1.ca.comcast.net ([2601:646:9200:a0f0::ce68]) by smtp.gmail.com with ESMTPSA id a13sm783186pfv.66.2021.12.09.15.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Dec 2021 15:40:17 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH] timezone: Make shell interpreter overridable in tzselect.ksh Date: Thu, 9 Dec 2021 15:40:15 -0800 Message-Id: <20211209234015.1554552-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-12.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Khem Raj via Libc-alpha From: Khem Raj Reply-To: Khem Raj Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" define new macro called KSHELL which can be used to define default shell use Bash by default Signed-off-by: Khem Raj --- Makeconfig | 9 +++++++++ timezone/Makefile | 1 + 2 files changed, 10 insertions(+) diff --git a/Makeconfig b/Makeconfig index 3fa2f13003..a1ea5d5571 100644 --- a/Makeconfig +++ b/Makeconfig @@ -292,6 +292,15 @@ ifndef sysincludedir sysincludedir = /usr/include endif +# The full path name of a Posix-compliant shell, preferably one that supports +# the Korn shell's 'select' statement as an extension. +# These days, Bash is the most popular. +# It should be OK to set this to /bin/sh, on platforms where /bin/sh +# lacks 'select' or doesn't completely conform to Posix, but /bin/bash +# is typically nicer if it works. +ifndef KSHELL +KSHELL = /bin/bash +endif # Commands to install files. ifndef INSTALL_DATA diff --git a/timezone/Makefile b/timezone/Makefile index c624a189b3..dc8f5277de 100644 --- a/timezone/Makefile +++ b/timezone/Makefile @@ -127,6 +127,7 @@ $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \ -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \ -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \ + -e 's|#!/bin/bash|#!$(KSHELL)|g' \ < $< > $@.new chmod 555 $@.new mv -f $@.new $@