Skip to content

Instantly share code, notes, and snippets.

@xaicron
Created August 27, 2012 16:32
Show Gist options
  • Save xaicron/3490145 to your computer and use it in GitHub Desktop.
Save xaicron/3490145 to your computer and use it in GitHub Desktop.
install-capnm
#!/bin/sh
set -e
HTTP_GET_COMMAND=""
if [ `which curl` ]; then
HTTP_GET_COMMAND="curl -L"
elif [ `which wget` ]; then
HTTP_GET_COMMAND="wget -O -"
elif [ `perl -v | grep "5.1[3-9]"` ]; then
HTTP_GET_COMMAND="perl -MHTTP::Tiny -e 'print +HTTP::Tiny->new->get(shift)->{content}'"
else
echo "curl or wget not found";
exit 1;
fi
$HTTP_GET_COMMAND http://cpanmin.us/ | perl - App::cpanminus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment