everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
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	[thread overview]
Message-ID: <20220120183419.2214-4-e@80x24.org> (raw)
In-Reply-To: <20220120183419.2214-1-e@80x24.org>

"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 <dtas-all@nongnu.org>
+# Copyright (C) all contributors <dtas-all@nongnu.org>
 # License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
 #
 # Process visualizer which shows pipe connections between processes with


  parent reply	other threads:[~2022-01-20 22:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-20 18:34 [PATCH 0/4] require Ruby 2.3+, support Ruby 3.1 Eric Wong
2022-01-20 18:34 ` [PATCH 1/4] require Ruby 2.3+ Eric Wong
2022-01-20 18:34 ` [PATCH 2/4] get rid of DTAS.dedupe_str wrapper Eric Wong
2022-01-20 18:34 ` Eric Wong [this message]
2022-01-20 18:34 ` [PATCH 4/4] use YAML.unsafe_load in Psych 4.x (Ruby 3.1+) Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://80x24.org/dtas/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220120183419.2214-4-e@80x24.org \
    --to=e@80x24.org \
    --cc=dtas-all@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).