improve this first-time install

Wed, 24 Nov 2021 14:22:41 -0600

author
Meredith Howard <mhoward@roomag.org>
date
Wed, 24 Nov 2021 14:22:41 -0600
changeset 956
61c91bec34c8
parent 955
54192edeb4e5
child 957
ea852d545173

improve this first-time install

bin/setup-cpan-faves file | annotate | diff | comparison | revisions
--- a/bin/setup-cpan-faves
+++ b/bin/setup-cpan-faves
@@ -1,7 +1,8 @@
 #!/bin/bash
-set -eu -o pipefail
+set -euo pipefail
 
 dists=(
+  App::cpanminus
   App::cpm
 
   Perl::Tidy
@@ -24,10 +25,9 @@ dists=(
 )
 
 if ! (command -v cpm && cpm -V) &>/dev/null; then
-  curl -fsSL --compressed https://git.io/cpm |
-    perl - install -g App::cpm
-
-  plenv rehash || :
+  cpm() {
+    curl -fsSL --compressed https://git.io/cpm | perl - $@
+  }
 fi
 
 cpm install -g "${dists[@]}"

mercurial