[LON-CAPA-cvs] cvs: modules /sharrison/autocpan install_RPM-Tools.sh
harris41
lon-capa-cvs@mail.lon-capa.org
Sun, 11 Aug 2002 23:08:02 -0000
harris41 Sun Aug 11 19:08:02 2002 EDT
Added files:
/modules/sharrison/autocpan install_RPM-Tools.sh
Log:
Automated script for installing RPM-Tools; a core dependency of
clean CPAN installation/uninstallation
Index: modules/sharrison/autocpan/install_RPM-Tools.sh
+++ modules/sharrison/autocpan/install_RPM-Tools.sh
#!/bin/sh
# install_RPM-Tools.sh will try to download and automatically install
# RPM-Tools on a system.
# Scott Harrison, sharrison@users.sourceforge.net, 2002
STATUS=0
wget --version > /dev/null || STATUS=1
[ $STATUS == "1" ] && echo "**** ERROR **** You need to install wget" && exit
wget http://www.cpan.org/ -O - > /dev/null || STATUS=1
[ $STATUS == "1" ] && echo "**** ERROR **** Unable to connect to CPAN" && exit
VERSION=0.5
rm -f RPM-Tools-$VERSION.tar.gz
rm -Rf RPM-Tools-$VERSION
wget http://www.cpan.org/authors/id/S/SH/SHARRISON/RPM-Tools-$VERSION.tar.gz
tar xzvf RPM-Tools-$VERSION.tar.gz
cd RPM-Tools-$VERSION && perl Makefile.PL && make && make test && make install