From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 64C521F852 for ; Thu, 20 Jan 2022 22:59:42 +0000 (UTC) Received: from localhost ([::1]:58468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAgP7-0002cd-Hc for e@80x24.org; Thu, 20 Jan 2022 17:59:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49680) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAcGs-0003Xe-KS for dtas-all@nongnu.org; Thu, 20 Jan 2022 13:34:57 -0500 Received: from dcvr.yhbt.net ([64.71.152.64]:47430) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAcGp-0004my-7Z for dtas-all@nongnu.org; Thu, 20 Jan 2022 13:34:53 -0500 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7A0001FA01 for ; Thu, 20 Jan 2022 18:34:20 +0000 (UTC) From: Eric Wong To: dtas-all@nongnu.org Subject: [PATCH 3/4] move dtas-graph into script/, support Perl for dtas.sh Date: Thu, 20 Jan 2022 18:34:18 +0000 Message-Id: <20220120183419.2214-4-e@80x24.org> In-Reply-To: <20220120183419.2214-1-e@80x24.org> References: <20220120183419.2214-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.71.152.64; envelope-from=e@80x24.org; helo=dcvr.yhbt.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: dtas-all@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: duct tape audio suite List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dtas-all-bounces+e=80x24.org@nongnu.org Sender: "dtas-all" "script/" is the standard location for Perl ExtUtils::MakeMaker-based installations, so and we'll probably overload "lib" to support Perl scripts. This is another step in expanding our use of Perl5 and avoiding the slow startup and API instability of Ruby. --- dtas.sh | 7 ++++--- {perl => script}/dtas-graph | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) rename {perl => script}/dtas-graph (97%) diff --git a/dtas.sh b/dtas.sh index d3ea5e1..1ceca15 100755 --- a/dtas.sh +++ b/dtas.sh @@ -1,7 +1,8 @@ #!/bin/sh -e # symlink this file to a directory in PATH to run dtas (or anything in bin/*) # without needing perms to install globally. Used by "make symlink-install" -p=$(realpath "$0" || readlink "$0") # neither is POSIX, but common -p=$(dirname "$p") c=$(basename "$0") # both are POSIX -exec ${RUBY-ruby} -I"$p"/lib "$p"/bin/"${c%.sh}" "$@" +p=$(realpath "$0" || readlink "$0"); # neither is POSIX, but common +p=$(dirname "$p") c=$(basename "$0"); c="${c%.sh}" +if test -x "$p/bin/$c"; then exec ${RUBY-ruby} -I"$p"/lib "$p/bin/$c" "$@"; +else exec ${PERL-perl} -I"$p"/lib "$p/script/$c" "$@"; fi : this script is too short to copyright diff --git a/perl/dtas-graph b/script/dtas-graph similarity index 97% rename from perl/dtas-graph rename to script/dtas-graph index 776485d..d918351 100755 --- a/perl/dtas-graph +++ b/script/dtas-graph @@ -1,5 +1,5 @@ #!/usr/bin/perl -w -# Copyright (C) 2013-2020 all contributors +# Copyright (C) all contributors # License: GPL-3.0+ # # Process visualizer which shows pipe connections between processes with