add shfmt and scdoc stubs

Wed, 28 Dec 2022 22:28:58 -0500

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 28 Dec 2022 22:28:58 -0500
changeset 1006
12d7a48cef22
parent 1005
42fb34b64292
child 1007
647fa5ff10a1

add shfmt and scdoc stubs

bin/scdoc file | annotate | diff | comparison | revisions
bin/shfmt file | annotate | diff | comparison | revisions
new file mode 100755
--- /dev/null
+++ b/bin/scdoc
@@ -0,0 +1,15 @@
+#!/bin/sh
+set -eu
+
+age_limit=180
+
+install_it() {
+  local scratch="$(mktemp -d)"
+  trap 'rm -rf -- "$scratch"' EXIT
+  git clone --depth=1 "https://git.sr.ht/~sircmpwn/scdoc" "$scratch"
+  make -C "$scratch" install PREFIX="$HOME/.local"
+  rm -rf -- "$scratch"
+  asdf reshim || :
+}
+
+. ~/.lib/sh/stubexec.sh
new file mode 100755
--- /dev/null
+++ b/bin/shfmt
@@ -0,0 +1,11 @@
+#!/bin/sh
+set -eu
+
+age_limit=90
+
+install_it() {
+  go install mvdan.cc/sh/v3/cmd/shfmt@latest
+  asdf reshim || :
+}
+
+. ~/.lib/sh/stubexec.sh

mercurial