aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install_perl_modules
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-12-22 09:51:32 +0000
committerStruan Donald <struan@exo.org.uk>2011-12-22 09:51:32 +0000
commit3409f4d169c56f46471a51173b34faf50acd228d (patch)
treea25c584fb4fe519bb59fafc9af6a78c58211e334 /bin/install_perl_modules
parentcb16f79668f5de3bff937298b8d1a75be57e9a63 (diff)
work in progress new module install scripts
Diffstat (limited to 'bin/install_perl_modules')
-rwxr-xr-xbin/install_perl_modules24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/install_perl_modules b/bin/install_perl_modules
new file mode 100755
index 000000000..19c3dca95
--- /dev/null
+++ b/bin/install_perl_modules
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+curl -LO http://xrl.us/cpanm
+mv cpanm bin
+chmod +x bin/cpanm
+./bin/cpanm -l local Carton
+
+export PATH=local/bin:$PATH
+export PERL5LIB=local/lib/perl5
+
+./local/bin/carton install --deployment
+
+perl -MImage::Magick -e 'exit()' >/dev/null 2>&1
+
+HAVE_IM=$?
+
+if [ $HAVE_IM -ne 0 ]
+then
+ read -p "Image::Magick is not installed. Do you want to attempt to install it?" yn
+ case $yn in
+ [Yy]* ) ./local/bin/carton install Image::Magick;;
+ * ) echo 'You will need to install it for FixMyStreet to work';;
+ esac
+fi