diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-20 10:33:47 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-06-20 10:33:47 +1200 |
commit | 56ab0f02ad532777d4e06710774526a7cf4e27f5 (patch) | |
tree | 2ff58ab61648b80971f02b5f0e74e5f7c65f6ea2 /bin/plenv-modules-update | |
parent | Update submodules (diff) | |
download | dotfiles-56ab0f02ad532777d4e06710774526a7cf4e27f5.tar.gz dotfiles-56ab0f02ad532777d4e06710774526a7cf4e27f5.zip |
Add plenv-modules-update
Diffstat (limited to 'bin/plenv-modules-update')
-rwxr-xr-x | bin/plenv-modules-update | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/plenv-modules-update b/bin/plenv-modules-update new file mode 100755 index 00000000..730db983 --- /dev/null +++ b/bin/plenv-modules-update @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +mf=$(mktemp) || exit +ef=$(mktemp) || exit +cf=$(mktemp) || exit +cleanup() { + rm -f -- "$mf" "$ef" "$cf" +} +trap cleanup EXIT + +plenv list-modules | LANG=C.UTF-8 sort > "$mf" +LANG=C.UTF-8 sort "$HOME"/.plenv/non-cpanm-modules > "$ef" +LANG=C.UTF-8 comm -23 -- "$mf" "$ef" > "$cf" + +while read -r module ; do + cpanm --from http://cpan.inspire.net.nz --notest --quiet -- "$module" +done < "$cf" |