Skip to content

Instantly share code, notes, and snippets.

@knutov
Forked from jmmills/cpanm-parallel-deps
Created June 17, 2017 10:27
Show Gist options
  • Select an option

  • Save knutov/0e89522a753636a4af29c79581a04e47 to your computer and use it in GitHub Desktop.

Select an option

Save knutov/0e89522a753636a4af29c79581a04e47 to your computer and use it in GitHub Desktop.
#!/bin/sh
_THREADS=$1
shift
_CPANM_OPTS="--notest --mirror http://ftp.cpan.org/pub/CPAN/ --mirror ${CPAN_MIRROR}"
cpanm --quiet --showdeps $* \
| xargs -n 1 -P $_THREADS cpanm ${_CPANM_OPTS} \
&& cpanm ${_CPANM_OPTS} $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment