# -----------------------------------------------------------------------
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
'
su - opensrf sh -c "$OSRF_COMMAND";
-
# Install pre-reqs
mkdir -p /usr/src/evergreen;
cd /usr/src/evergreen;