aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install_perl_modules
diff options
context:
space:
mode:
Diffstat (limited to 'bin/install_perl_modules')
-rwxr-xr-xbin/install_perl_modules26
1 files changed, 26 insertions, 0 deletions
diff --git a/bin/install_perl_modules b/bin/install_perl_modules
new file mode 100755
index 000000000..ece7e7bce
--- /dev/null
+++ b/bin/install_perl_modules
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd | sed -e 's/\/bin$//' )"
+
+curl -LO http://xrl.us/cpanm
+mv cpanm $DIR/bin
+chmod +x $DIR/bin/cpanm
+$DIR/bin/cpanm -l local Carton
+
+export PATH=$DIR/local/bin:$PATH
+export PERL5LIB=$DIR/local/lib/perl5
+
+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