Switch stubexec to self-invoke

Fri, 06 May 2022 22:03:51 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Fri, 06 May 2022 22:03:51 -0500
changeset 992
4e3e37ce84bc
parent 991
a925474b9558
child 993
4856df6adb16

Switch stubexec to self-invoke

.lib/sh/stubexec.sh file | annotate | diff | comparison | revisions
bin/cpm file | annotate | diff | comparison | revisions
bin/gotags file | annotate | diff | comparison | revisions
bin/pg_format file | annotate | diff | comparison | revisions
bin/pry file | annotate | diff | comparison | revisions
bin/rdbg file | annotate | diff | comparison | revisions
bin/stow file | annotate | diff | comparison | revisions
--- a/.lib/sh/stubexec.sh
+++ b/.lib/sh/stubexec.sh
@@ -35,3 +35,5 @@ stubexec() {
   install_it
   stubexec $*
 }
+
+stubexec "$@"
--- a/bin/cpm
+++ b/bin/cpm
@@ -1,6 +1,5 @@
 #!/bin/sh
 set -eu
-. ~/.lib/sh/stubexec.sh
 
 install_it() {
   curl -fsSL --compressed https://git.io/cpm |
@@ -9,4 +8,4 @@ install_it() {
   asdf reshim perl || :
 }
 
-stubexec "$@"
+. ~/.lib/sh/stubexec.sh
--- a/bin/gotags
+++ b/bin/gotags
@@ -1,10 +1,9 @@
 #!/bin/sh
 set -eu
-. ~/.lib/sh/stubexec.sh
 
 install_it() {
   go install github.com/jstemmer/gotags@latest
   asdf reshim || :
 }
 
-stubexec "$@"
+. ~/.lib/sh/stubexec.sh
--- a/bin/pg_format
+++ b/bin/pg_format
@@ -1,10 +1,9 @@
 #!/bin/sh
 set -eu
-. ~/.lib/sh/stubexec.sh
 
 install_it() {
   cpanm -n 'https://github.com/darold/pgFormatter.git'
   asdf reshim perl || :
 }
 
-stubexec "$@"
+. ~/.lib/sh/stubexec.sh
--- a/bin/pry
+++ b/bin/pry
@@ -1,6 +1,5 @@
 #!/bin/sh
 set -eu
-. ~/.lib/sh/stubexec.sh
 
 install_it() {
   [ -w "$(gem env gemdir)" ] ||
@@ -11,4 +10,4 @@ install_it() {
   asdf reshim ruby || :
 }
 
-stubexec "$@"
+. ~/.lib/sh/stubexec.sh
--- a/bin/rdbg
+++ b/bin/rdbg
@@ -1,6 +1,5 @@
 #!/bin/sh
 set -eu
-. ~/.lib/sh/stubexec.sh
 
 install_it() {
   [ -w "$(gem env gemdir)" ] ||
@@ -10,4 +9,4 @@ install_it() {
   asdf reshim ruby || :
 }
 
-stubexec "$@"
+. ~/.lib/sh/stubexec.sh
--- a/bin/stow
+++ b/bin/stow
@@ -1,10 +1,9 @@
 #!/bin/sh
 set -eu
-. ~/.lib/sh/stubexec.sh
 
 install_it() {
   cpanm -n Stow
   asdf reshim perl || :
 }
 
-stubexec "$@"
+. ~/.lib/sh/stubexec.sh

mercurial