Skip to content

Instantly share code, notes, and snippets.

@s1037989
Forked from hatak/carton-setup.sh
Last active July 7, 2017 06:23
Show Gist options
  • Save s1037989/03b9fcf4e4ee0bfe890b7e529965c315 to your computer and use it in GitHub Desktop.
Save s1037989/03b9fcf4e4ee0bfe890b7e529965c315 to your computer and use it in GitHub Desktop.
install perlbrew + cpanm + carton
#!/bin/bash
PERL_STABLE="5.26.0"
echo '%< --- installing perlbrew ---'
echo
echo 'If this fails, apt install build-essential'
curl -kL http://install.perlbrew.pl | bash
source ~/perl5/perlbrew/etc/bashrc
perlbrew install --notest perl-${PERL_STABLE}
perlbrew install-cpanm
perlbrew switch perl-${PERL_STABLE}
echo '%< --- installing carton ---'
echo
perlbrew lib create carton
perlbrew switch perl-${PERL_STABLE}@carton
source ~/perl5/perlbrew/etc/bashrc
cpanm Carton
echo '%< --- install finished ! ---'
echo 'Please add that source line to config'
echo '$ echo "source ~/perl5/perlbrew/etc/bashrc" >> ~/.bashrc'
304 export PERLBREW_ROOT=/opt/perl5
305 curl -kL http://install.perlbrew.pl | bash
306 source /opt/perl5/etc/bashrc
307 perlbrew
308 PERL_STABLE="5.26.0"
309 date ; perlbrew install --notest perl-${PERL_STABLE} ; date
310 perlbrew install-cpanm
311 perlbrew switch perl-${PERL_STABLE}
312 perl -v
313 cpanm Carton
314 find /opt/ -name Carton.pm
315 cpanm Mojolicious Mojo::ACME
316 find /opt/ -name Carton.pm
317 find /opt/ -name Mojo.pm
318 cd /opt/mojo-acme/
319 ls
320 cat cpanfile
321 carton install
322 joe cpanfile
323 mojo version
324 find ./ -name Mojo.pm
325 find ./ -name mojo
326 ./local/bin/mojo version
327 carton exec ./local/bin/mojo version
328 joe cpanfile
329 carton install
330 joe cpanfile
331 carton exec ./local/bin/mojo version
332 perl -v
333 carton exec bin/mojo-acme daemon
334 ls -l bin/
335 chmod +x bin/mojo-acme
336 carton exec bin/mojo-acme daemon
337 carton exec perl bin/mojo-acme daemon
338 carton exec perl bin/mojo-acme version
339 carton exec perl bin/mojo-acme
340 which carton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment