about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-01-20 18:34:18 +0000
committerEric Wong <e@80x24.org>2022-01-21 19:54:43 +0000
commit748c3633ce794685af343de0bcd24eca7440281b (patch)
tree704aa24640712de04c102eceed7eb169d787d568
parent5111742a5a100e44fccf191b12a13c452b025944 (diff)
downloaddtas-748c3633ce794685af343de0bcd24eca7440281b.tar.gz
"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.
-rwxr-xr-xdtas.sh7
-rwxr-xr-xscript/dtas-graph (renamed from perl/dtas-graph)2
2 files changed, 5 insertions, 4 deletions
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
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