#!/bin/bash -norc PERL=perl case "`uname -s`" in Darwin ) PERL=/usr/bin/perl ;; esac DIR="$( cd "$( dirname "$0" )" && pwd )" cat </dev/null then gzip -cd Mozilla-CA.tar.gz | tar xvf - fi mkdir -p _cpan/CPAN echo '1;' >> _cpan/CPAN/MyConfig.pm if ! "${PERL}" -I_cpan -Iaux/lib/perl5 setup-deps.pl setup-deps.log 2>&1 then if grep '^read timeout.*HTTP' setup-deps.log >/dev/null then cat </dev/null then cat </dev/null 2>&1 then if [ ! -f $HOME/.$target ] || grep 'bashrc' "$HOME/.$target" >/dev/null 2>&1 then target=bashrc else if [ -n "$prfx" ] then echo -e "$prfx" prfx="" fi echo " echo \"source ~/.bash_profile\" >>" "\$HOME/.bashrc" | tee $advice fi fi if ! grep "PATH.*edirect" "$HOME/.$target" >/dev/null 2>&1 then if [ -n "$prfx" ] then echo -e "$prfx" prfx="" fi echo " echo \"export PATH=\\\${PATH}:$DIR\" >>" "\$HOME/.$target" \ | tee $advice fi if [ -z "$prfx" ] then echo "" echo "or manually edit the PATH variable assignment in your .bash_profile file." echo "" echo "Would you like to do that automatically now? [y/N]" read response case "$response" in [Yy]* ) . $advice; echo "OK, done." ;; [Nn]* | '' ) echo "Holding off, then." ;; * ) echo "Conservatively taking that as a no." ;; esac fi rm $advice