From: Bill Erickson Date: Fri, 23 Mar 2012 01:19:47 +0000 (-0400) Subject: cpan prompt repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=58bef0b30605101e503eee3f0038f2c5ea1c13d4;p=working%2Frandom.git cpan prompt repairs Signed-off-by: Bill Erickson --- diff --git a/installer/squeeze/eg_squeeze_installer.sh b/installer/squeeze/eg_squeeze_installer.sh index a68afa957..f24a5d9e4 100755 --- a/installer/squeeze/eg_squeeze_installer.sh +++ b/installer/squeeze/eg_squeeze_installer.sh @@ -27,27 +27,40 @@ ADMIN_PASS='demo123'; # ----------------------------------------------------------------------- if [ ! "$(grep 'squeeze-backports' /etc/apt/sources.list)" ]; then - echo "Please add the following to /etc/apt/sources.list:" - echo "deb http://backports.debian.org/debian-backports squeeze-backports main contrib" + echo ' + Please add the following to /etc/apt/sources.list: + deb http://backports.debian.org/debian-backports squeeze-backports main contrib + ' exit; fi; +# ----------------------------------------------------------------------- +# force CPAN to load +cpan foo + # CPAN follow pre-reqs? cpan_policy=$(perl -MCPAN::Config -e 'print $CPAN::Config->{prerequisites_policy}'); if [ $cpan_policy != 'follow' ]; then echo ' + +----------------------------------------------------------------------- The install will go faster if CPAN is configured to automatically install prerequisites. You can revert the action later with: -% echo -e "o conf prerequisites_policy ask\\n o conf commit" | cpan - -Automatically install prereqs? [Y/n] '; - read X; - if [ "$X" == 'y' -o "$X" == 'Y' ]; then - echo -e "o conf prerequisites_policy follow\\n o conf commit" | cpan - fi; +% echo -e "o conf prerequisites_policy ask\n o conf commit" | cpan ' + while true; do + echo -n 'Automatically install prereqs? [Y/n] '; + read X; + [ "$X" == 'n' -o "$X" == "N" ] && break; + if [ "$X" == 'y' -o "$X" == 'Y' ]; then + echo -e "o conf prerequisites_policy follow\\n o conf commit" | cpan + break; + fi; + done; fi; +# ----------------------------------------------------------------------- + # And they're off... BASE_DIR=$PWD @@ -78,7 +91,6 @@ git clone git://git.evergreen-ils.org/Evergreen.git; ' su - opensrf sh -c "$OSRF_COMMAND"; - # Install pre-reqs mkdir -p /usr/src/evergreen; cd /usr/src/evergreen;