aboutsummaryrefslogtreecommitdiffstats
path: root/bin/install_perl_modules
blob: 19c3dca9502d8618971908da04eb36e22a3f25bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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