diff options
author | Struan Donald <struan@exo.org.uk> | 2012-02-02 16:31:39 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-02-02 16:31:39 +0000 |
commit | a27d506f2f593bd64f5c744856dacac4e1f52420 (patch) | |
tree | a3ec7dff4bb200e253b4b7b7530490a6fa94d786 /bin/install_perl_modules | |
parent | bd1be5d99f2c51f9fe2eb7751392b4b44fd74edc (diff) | |
parent | b0e3c5065d86248e5d3d8bf9848193730ef60f1c (diff) |
Merge branch 'packaging'
Conflicts:
.gitignore
Diffstat (limited to 'bin/install_perl_modules')
-rwxr-xr-x | bin/install_perl_modules | 26 |
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 |